summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-11-20 14:27:10 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-11-20 14:27:10 +0000
commit97b66e1173fb9c9a66b41a9c710210dbd250b4d3 (patch)
treee386229869ec8a44f7f753623430143d7c605c4c /sys-freebsd/freebsd-libexec/files
parentStable on sparc wrt #155544 (diff)
downloadgentoo-2-97b66e1173fb9c9a66b41a9c710210dbd250b4d3.tar.gz
gentoo-2-97b66e1173fb9c9a66b41a9c710210dbd250b4d3.tar.bz2
gentoo-2-97b66e1173fb9c9a66b41a9c710210dbd250b4d3.zip
Add init script for bootp.
(Portage version: 2.1.2_rc2)
Diffstat (limited to 'sys-freebsd/freebsd-libexec/files')
-rw-r--r--sys-freebsd/freebsd-libexec/files/bootpd.confd9
-rw-r--r--sys-freebsd/freebsd-libexec/files/bootpd.initd28
2 files changed, 37 insertions, 0 deletions
diff --git a/sys-freebsd/freebsd-libexec/files/bootpd.confd b/sys-freebsd/freebsd-libexec/files/bootpd.confd
new file mode 100644
index 000000000000..1dcd1e1c237c
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/bootpd.confd
@@ -0,0 +1,9 @@
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/files/bootpd.confd,v 1.1 2006/11/20 14:27:10 flameeyes Exp $
+
+# Configuration file for /etc/init.d/bootpd
+
+# Name of the configuration file for bootpd
+# BOOTPTAB_FILE="/etc/bootptab"
+
+# Options to pass to bootpd. See bootpd(8).
+# BOOTPD_OPTS=""
diff --git a/sys-freebsd/freebsd-libexec/files/bootpd.initd b/sys-freebsd/freebsd-libexec/files/bootpd.initd
new file mode 100644
index 000000000000..c8cf16abb79b
--- /dev/null
+++ b/sys-freebsd/freebsd-libexec/files/bootpd.initd
@@ -0,0 +1,28 @@
+#!/sbin/runscript
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-libexec/files/bootpd.initd,v 1.1 2006/11/20 14:27:10 flameeyes Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ local bootptab=${BOOTPTAB_FILE:-/etc/bootptab}
+
+ if ! [[ -f ${bootptab} ]]; then
+ eerror "Unable to find the bootptab file: ${bootptab}"
+ eend 1
+ return 1
+ fi
+
+ ebegin "Starting BOOTP server"
+ start-stop-daemon --start --exec /usr/libexec/bootpd -- ${BOOTPD_OPTS} ${bootptab}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping BOOTP server"
+ start-stop-daemon --stop --exec /usr/libexec/bootpd
+ eend $?
+}