#!/bin/sh state=$1 pid=`/usr/bin/ps -e | /usr/bin/grep dhcpd | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` set `who -r` case $state in 'start') if [ $9 = "2" -o $9 = "3" ] then exit fi [ -f /usr/sbin/dhcpd ] && /usr/sbin/dhcpd hme0 echo "dhcp services started" ;; 'stop') if [ "${pid}" != "" ] then /usr/bin/kill ${pid} echo "dhcp services stopped" fi ;; esac