1 #!/bin/sh /etc/rc.common
5 pidfile=/var/run/ahcpd.pid
9 config_get interfaces "$cfg" interfaces
10 config_get no_ipv4 "$cfg" no_ipv4
11 config_get no_dns "$cfg" no_dns
16 config_foreach ahcpd_config ahcpd
18 [ -r /usr/lib/ahcp/ahcp.dat ] && authority="-a /usr/lib/ahcp/ahcp.dat"
19 if [ -e $pidfile ] ; then
20 echo "$pidfile exists -- not starting ahcpd." >&2
22 /usr/bin/ahcpd -D -I $pidfile ${no_ipv4:+-s} ${no_dns:+-N} $authority $interfaces
27 [ -e $pidfile ] && kill $(cat $pidfile)
28 [ -e $pidfile ] && sleep 2
29 [ -e $pidfile ] && sleep 4
30 [ -e $pidfile ] && echo "Failed to stop ahcpd ($pidfile still exists)."