Browse Source

fix run-command script

master
parent
commit
8d04557133
  1. 2
      dhcpd/dhcpd.spec
  2. 5
      dhcpd/rc.dhcpd

2
dhcpd/dhcpd.spec

@ -36,7 +36,7 @@ Class: BASE
Group: DHCP
License: ISC/BSD
Version: %{V_opkg}
Release: 20101127
Release: 20101218
# package options
%option with_fsl yes

5
dhcpd/rc.dhcpd

@ -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"

Loading…
Cancel
Save