aboutsummaryrefslogtreecommitdiff
path: root/contrib/solaris.init
blob: 2c79898a5296b540dc42fb353598a8dcbb116b82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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