packages/ipv6/ahcpd/files/ahcpd.init
kerneis 3a81a088df [package] ahcpd: Fix reload rule in init script
Signed-off-by: Gabriel Kerneis <kerneis@pps.jussieu.fr>

git-svn-id: svn://svn.openwrt.org/openwrt/packages@20166 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-03-12 17:29:27 +00:00

28 lines
524 B
Bash

#!/bin/sh /etc/rc.common
START=71
PID_F="/var/run/ahcpd.pid"
EXTRA_COMMANDS="status"
EXTRA_HELP=" status Print ahcpd's status to the log file."
. /lib/network/ahcp.sh
start() {
mkdir -p /var/lib
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"
}
stop() {
[ -f "$PID_F" ] && kill $(cat "$PID_F")
}
status() {
[ -f $PID_F ] && kill -USR1 $(cat $PID_F)
}