aboutsummaryrefslogtreecommitdiffstats
path: root/net/isc-dhcp3
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2000-12-13 16:26:16 +0800
committerobrien <obrien@FreeBSD.org>2000-12-13 16:26:16 +0800
commit3a889614eae02e252401411006cb3192ea0e2166 (patch)
treef7df7fbae5aa58510fd3236890b8cdb3714e4667 /net/isc-dhcp3
parentc43d2e4e49416c10c703b701eb9afe50cc9dcaa8 (diff)
downloadfreebsd-ports-gnome-3a889614eae02e252401411006cb3192ea0e2166.tar.gz
freebsd-ports-gnome-3a889614eae02e252401411006cb3192ea0e2166.tar.zst
freebsd-ports-gnome-3a889614eae02e252401411006cb3192ea0e2166.zip
Add sample RC startup script.
Submitted by: Jun Kuriyama <kuriyama@imgsrc.co.jp> (w/changes by me)
Diffstat (limited to 'net/isc-dhcp3')
-rw-r--r--net/isc-dhcp3/Makefile2
-rw-r--r--net/isc-dhcp3/files/isc-dhcpd.sh.sample31
-rw-r--r--net/isc-dhcp3/pkg-plist1
3 files changed, 34 insertions, 0 deletions
diff --git a/net/isc-dhcp3/Makefile b/net/isc-dhcp3/Makefile
index 36a19536a905..db3dd0921de9 100644
--- a/net/isc-dhcp3/Makefile
+++ b/net/isc-dhcp3/Makefile
@@ -57,5 +57,7 @@ post-install:
strip ${PREFIX}/sbin/${file}; \
fi
.endfor
+ ${INSTALL_SCRIPT} ${FILESDIR}/isc-dhcpd.sh.sample \
+ ${PREFIX}/etc/rc.d
.include <bsd.port.mk>
diff --git a/net/isc-dhcp3/files/isc-dhcpd.sh.sample b/net/isc-dhcp3/files/isc-dhcpd.sh.sample
new file mode 100644
index 000000000000..f07d745c3772
--- /dev/null
+++ b/net/isc-dhcp3/files/isc-dhcpd.sh.sample
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+# $FreeBSD$
+
+IFACES="SET_THIS"
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ ${PREFIX}/sbin/dhcpd $IFACES
+ ;;
+stop)
+ kill `cat /var/run/dhcpd.pid`
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+status)
+ ps -auxww | egrep '(conserver|console)' | egrep -v "($0|egrep)"
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop|restart|status}" >&2
+ ;;
+esac
+
+exit 0
diff --git a/net/isc-dhcp3/pkg-plist b/net/isc-dhcp3/pkg-plist
index 6fdb0cfe2fba..6e6b013069cc 100644
--- a/net/isc-dhcp3/pkg-plist
+++ b/net/isc-dhcp3/pkg-plist
@@ -3,5 +3,6 @@ etc/dhclient-script
sbin/dhclient
sbin/dhcpd
sbin/dhcrelay
+etc/rc.d/isc-dhcpd.sh.sample
@exec touch /var/db/dhcpd.leases
@exec touch %D/etc/dhclient.conf