From 3a889614eae02e252401411006cb3192ea0e2166 Mon Sep 17 00:00:00 2001 From: obrien Date: Wed, 13 Dec 2000 08:26:16 +0000 Subject: Add sample RC startup script. Submitted by: Jun Kuriyama (w/changes by me) --- net/isc-dhcp3-server/Makefile | 2 ++ net/isc-dhcp3-server/files/isc-dhcpd.sh.sample | 31 +++++++++++++++++++++++++ net/isc-dhcp3-server/pkg-plist | 1 + net/isc-dhcp3/Makefile | 2 ++ net/isc-dhcp3/files/isc-dhcpd.sh.sample | 31 +++++++++++++++++++++++++ net/isc-dhcp3/pkg-plist | 1 + net/isc-dhcp30-server/Makefile | 2 ++ net/isc-dhcp30-server/files/isc-dhcpd.sh.sample | 31 +++++++++++++++++++++++++ net/isc-dhcp30-server/pkg-plist | 1 + net/isc-dhcp31-server/Makefile | 2 ++ net/isc-dhcp31-server/files/isc-dhcpd.sh.sample | 31 +++++++++++++++++++++++++ net/isc-dhcp31-server/pkg-plist | 1 + net/isc-dhcp40-server/Makefile | 2 ++ net/isc-dhcp40-server/files/isc-dhcpd.sh.sample | 31 +++++++++++++++++++++++++ net/isc-dhcp40-server/pkg-plist | 1 + 15 files changed, 170 insertions(+) create mode 100644 net/isc-dhcp3-server/files/isc-dhcpd.sh.sample create mode 100644 net/isc-dhcp3/files/isc-dhcpd.sh.sample create mode 100644 net/isc-dhcp30-server/files/isc-dhcpd.sh.sample create mode 100644 net/isc-dhcp31-server/files/isc-dhcpd.sh.sample create mode 100644 net/isc-dhcp40-server/files/isc-dhcpd.sh.sample (limited to 'net') diff --git a/net/isc-dhcp3-server/Makefile b/net/isc-dhcp3-server/Makefile index 36a19536a90..db3dd0921de 100644 --- a/net/isc-dhcp3-server/Makefile +++ b/net/isc-dhcp3-server/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 diff --git a/net/isc-dhcp3-server/files/isc-dhcpd.sh.sample b/net/isc-dhcp3-server/files/isc-dhcpd.sh.sample new file mode 100644 index 00000000000..f07d745c377 --- /dev/null +++ b/net/isc-dhcp3-server/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-server/pkg-plist b/net/isc-dhcp3-server/pkg-plist index 6fdb0cfe2fb..6e6b013069c 100644 --- a/net/isc-dhcp3-server/pkg-plist +++ b/net/isc-dhcp3-server/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 diff --git a/net/isc-dhcp3/Makefile b/net/isc-dhcp3/Makefile index 36a19536a90..db3dd0921de 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 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 00000000000..f07d745c377 --- /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 6fdb0cfe2fb..6e6b013069c 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 diff --git a/net/isc-dhcp30-server/Makefile b/net/isc-dhcp30-server/Makefile index 36a19536a90..db3dd0921de 100644 --- a/net/isc-dhcp30-server/Makefile +++ b/net/isc-dhcp30-server/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 diff --git a/net/isc-dhcp30-server/files/isc-dhcpd.sh.sample b/net/isc-dhcp30-server/files/isc-dhcpd.sh.sample new file mode 100644 index 00000000000..f07d745c377 --- /dev/null +++ b/net/isc-dhcp30-server/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-dhcp30-server/pkg-plist b/net/isc-dhcp30-server/pkg-plist index 6fdb0cfe2fb..6e6b013069c 100644 --- a/net/isc-dhcp30-server/pkg-plist +++ b/net/isc-dhcp30-server/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 diff --git a/net/isc-dhcp31-server/Makefile b/net/isc-dhcp31-server/Makefile index 36a19536a90..db3dd0921de 100644 --- a/net/isc-dhcp31-server/Makefile +++ b/net/isc-dhcp31-server/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 diff --git a/net/isc-dhcp31-server/files/isc-dhcpd.sh.sample b/net/isc-dhcp31-server/files/isc-dhcpd.sh.sample new file mode 100644 index 00000000000..f07d745c377 --- /dev/null +++ b/net/isc-dhcp31-server/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-dhcp31-server/pkg-plist b/net/isc-dhcp31-server/pkg-plist index 6fdb0cfe2fb..6e6b013069c 100644 --- a/net/isc-dhcp31-server/pkg-plist +++ b/net/isc-dhcp31-server/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 diff --git a/net/isc-dhcp40-server/Makefile b/net/isc-dhcp40-server/Makefile index 36a19536a90..db3dd0921de 100644 --- a/net/isc-dhcp40-server/Makefile +++ b/net/isc-dhcp40-server/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 diff --git a/net/isc-dhcp40-server/files/isc-dhcpd.sh.sample b/net/isc-dhcp40-server/files/isc-dhcpd.sh.sample new file mode 100644 index 00000000000..f07d745c377 --- /dev/null +++ b/net/isc-dhcp40-server/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-dhcp40-server/pkg-plist b/net/isc-dhcp40-server/pkg-plist index 6fdb0cfe2fb..6e6b013069c 100644 --- a/net/isc-dhcp40-server/pkg-plist +++ b/net/isc-dhcp40-server/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 -- cgit