|
|
|
|
@ -18,7 +18,8 @@
|
|
|
|
|
dhcpd_pidfile="@l_prefix@/var/dhcpd/run/dhcpd.pid" |
|
|
|
|
dhcpd_leases="@l_prefix@/var/dhcpd/db/dhcpd.leases" |
|
|
|
|
dhcpd_signal () { |
|
|
|
|
[ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile` |
|
|
|
|
if [ ! -f $dhcpd_pidfile ]; then return 1; fi |
|
|
|
|
kill -$1 `cat $dhcpd_pidfile` |
|
|
|
|
} |
|
|
|
|
dhcpd_start () { |
|
|
|
|
if [ ! -f $dhcpd_leases ]; then |
|
|
|
|
@ -44,7 +45,7 @@
|
|
|
|
|
%status -u @l_susr@ -o |
|
|
|
|
dhcpd_usable="unknown" |
|
|
|
|
dhcpd_active="no" |
|
|
|
|
dhcpd_start -q -t || dhcpd_usable="no" |
|
|
|
|
@l_prefix@/sbin/dhcpd -q -t || dhcpd_usable="no" |
|
|
|
|
[ ".$dhcpd_if" = . ] && dhcpd_usable="no" |
|
|
|
|
rcService dhcpd enable yes && \ |
|
|
|
|
dhcpd_signal 0 && dhcpd_active="yes" |
|
|
|
|
|