David van Moolenbroek 83ee113ee0 Import NetBSD dhclient(8), dhcpd(8), dhcrelay(8)
dhcrelay(8) and omshell(1) have not been tested.

Change-Id: I0cad89f65666af4e366a86e130ce8df0894c3bb4
2017-03-21 22:00:14 +00:00

29 lines
426 B
Bash

#!/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