You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
987 B
41 lines
987 B
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc |
|
## |
|
## rc.dhcpd -- Run-Commands |
|
## |
|
|
|
%config |
|
dhcpd_enable="$openpkg_rc_def" |
|
|
|
%common |
|
dhcpd_pidfile="@l_prefix@/var/dhcpd/dhcpd.pid" |
|
dhcpd_signal () { |
|
[ -f $dhcpd_pidfile ] && kill -$1 `cat $dhcpd_pidfile` |
|
} |
|
|
|
%status -p 200 -u @l_susr@ -o |
|
dhcpd_usable="unknown" |
|
dhcpd_active="no" |
|
rcService dhcpd enable yes && \ |
|
dhcpd_signal 0 && dhcpd_active="yes" |
|
echo "dhcpd_enable=\"$dhcpd_enable\"" |
|
echo "dhcpd_usable=\"$dhcpd_usable\"" |
|
echo "dhcpd_active=\"$dhcpd_active\"" |
|
|
|
%start -p 200 -u @l_susr@ |
|
rcService dhcpd enable yes || exit 0 |
|
@l_prefix@/sbin/dhcpd >/dev/null 2>&1 |
|
|
|
%stop -p 200 -u @l_susr@ |
|
rcService dhcpd enable yes || exit 0 |
|
dhcpd_signal TERM |
|
|
|
%restart -u @l_susr@ |
|
rcService dhcpd enable yes || exit 0 |
|
dhcpd_signal TERM |
|
sleep 2 |
|
@l_prefix@/sbin/dhcpd >/dev/null 2>&1 |
|
|
|
%reload -u @l_susr@ |
|
rcService dhcpd enable yes || exit 0 |
|
dhcpd_signal HUP |
|
|
|
|