1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2007 OpenWrt.org
10 config_get_bool _val "$section" "$option" '0'
11 [ "$_val" -gt 0 ] && append args "$3"
19 config_get _val "$section" "$option"
20 [ -n "$_val" ] && append args "$3$_val"
27 append_bool "$section" bidirectional "-b"
28 append_string "$section" device "-f "
29 append_string "$section" bind "-i "
30 append_string "$section" port ""
31 config_get_bool "enabled" "$section" "enabled" '1'
32 [ "$enabled" -gt 0 ] && /usr/sbin/p910nd $args
37 config_get port "$section" port
39 PID_F=/var/run/p910${port}d.pid
40 [ -f $PID_F ] && kill $(cat $PID_F)
45 config_foreach start_service p910nd
50 config_foreach stop_service p910nd