]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Solaris /etc/rc.d script for dhcp server.
authorTed Lemon <source@isc.org>
Mon, 4 Oct 1999 23:04:43 +0000 (23:04 +0000)
committerTed Lemon <source@isc.org>
Mon, 4 Oct 1999 23:04:43 +0000 (23:04 +0000)
contrib/solaris.init [new file with mode: 0644]

diff --git a/contrib/solaris.init b/contrib/solaris.init
new file mode 100644 (file)
index 0000000..2c79898
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Contributed by Brian Murrell
+state=$1
+set `who -r`
+case $state in
+'start')
+       if [ $9 = "2" -o $9 = "3" ]
+       then
+               exit
+       fi
+       if [ -f @PREFIX@/sbin/dhcpd ]; then
+               echo "Starting the ISC DHCP server"
+               @PREFIX@/sbin/dhcpd
+       fi
+       ;;
+'stop')
+       if [ -f @PREFIX@/etc/dhcpd.pid ]; then
+               PID=`cat @PREFIX@/etc/dhcpd.pid`
+               if [ -d /proc/$PID ]; then
+                       echo "Stopping the ISC DHCP server"
+                       kill $PID
+               fi
+       fi
+       ;;
+esac