miniupnpd:

- restart miniupnpd on hotplug event if it is enabled but not running
	- remove duplicate scan_interfaces


git-svn-id: svn://svn.openwrt.org/openwrt/packages@13743 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
jow 2008-12-25 03:46:04 +00:00
parent 3b70e33939
commit 8217fca3a6
2 changed files with 13 additions and 10 deletions

View File

@ -1,14 +1,18 @@
#!/bin/sh
/etc/init.d/miniupnpd enabled && killall -0 miniupnpd 2>/dev/null && {
. /lib/miniupnpd/firewall.sh
/etc/init.d/miniupnpd enabled && {
killall -0 miniupnpd 2>/dev/null && {
. /lib/miniupnpd/firewall.sh
[ "$ACTION" = "ifup" ] && {
upnp_firewall_delif
upnp_firewall_addif
}
[ "$ACTION" = "ifup" ] && {
upnp_firewall_delif
upnp_firewall_addif
}
[ "$ACTION" = "ifdown" ] && {
upnp_firewall_delif
[ "$ACTION" = "ifdown" ] && {
upnp_firewall_delif
}
} || {
/etc/init.d/miniupnpd restart
}
}

View File

@ -17,7 +17,6 @@ start() {
config_get download config download
config_get_bool logging config log_output 0
scan_interfaces
config_get extif ${extif:-wan} ifname
if [ -n "$extif" ]; then
@ -41,7 +40,7 @@ start() {
if [ "$logging" = "1" ]; then
eval start-stop-daemon -S -x miniupnpd -- $args -d | logger -t miniupnpd &
else
eval start-stop-daemon -S -x miniupnpd -- $args
eval start-stop-daemon -S -x miniupnpd -- $args 2>/dev/null
fi
else
logger -t "upnp daemon" "external interface not found, not starting"