2007-10-10 12:52:10 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
|
2008-05-29 20:57:34 +00:00
|
|
|
START=71
|
2010-02-22 11:00:30 +00:00
|
|
|
PID_F="/var/run/ahcpd.pid"
|
|
|
|
EXTRA_COMMANDS="status"
|
|
|
|
EXTRA_HELP=" status Print ahcpd's status to the log file."
|
2007-10-10 12:52:10 +00:00
|
|
|
|
2010-02-22 11:00:30 +00:00
|
|
|
. /lib/network/ahcp.sh
|
2007-10-10 12:52:10 +00:00
|
|
|
|
2009-12-20 18:23:24 +00:00
|
|
|
start() {
|
|
|
|
mkdir -p /var/lib
|
2010-02-22 11:00:30 +00:00
|
|
|
config_load ahcpd
|
|
|
|
unset args
|
|
|
|
unset interfaces
|
|
|
|
config_foreach ahcp_config ahcpd
|
|
|
|
config_foreach ahcp_server ahcpd
|
|
|
|
[ -z "$interfaces" ] && return 0
|
|
|
|
eval "/usr/sbin/ahcpd -D -I $PID_F $args $interfaces"
|
2009-12-20 18:23:24 +00:00
|
|
|
}
|
|
|
|
|
2007-10-10 12:52:10 +00:00
|
|
|
stop() {
|
2010-02-22 11:00:30 +00:00
|
|
|
[ -f "$PID_F" ] && kill $(cat "$PID_F")
|
|
|
|
}
|
|
|
|
|
|
|
|
status() {
|
|
|
|
[ -f $PID_F ] && kill -USR1 $(cat $PID_F)
|
|
|
|
}
|