2007-01-10 11:41:14 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
2012-05-29 01:30:23 +00:00
|
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
2007-01-10 11:41:14 +00:00
|
|
|
# Copyright (C) 2006 loswillios
|
2011-11-13 22:16:09 +00:00
|
|
|
|
2007-01-10 11:41:14 +00:00
|
|
|
START=65
|
|
|
|
|
|
|
|
start() {
|
2012-05-29 01:30:23 +00:00
|
|
|
. /lib/functions/network.sh
|
|
|
|
|
|
|
|
network_get_device wan_if 'wan' || return 1
|
|
|
|
network_get_device lan_if 'lan' || return 1
|
2011-11-13 22:16:09 +00:00
|
|
|
|
2012-05-29 01:30:23 +00:00
|
|
|
route add -net 239.0.0.0 netmask 255.0.0.0 $lan_if
|
2011-11-13 22:16:09 +00:00
|
|
|
service_start /usr/sbin/upnpd $wan_if $lan_if
|
2007-01-10 11:41:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2012-05-29 01:30:23 +00:00
|
|
|
. /lib/functions/network.sh
|
2007-01-10 11:41:14 +00:00
|
|
|
|
2011-11-13 22:16:09 +00:00
|
|
|
service_stop /usr/sbin/upnpd
|
2012-05-29 01:30:23 +00:00
|
|
|
|
|
|
|
network_get_device lan_if 'lan' && \
|
|
|
|
route del -net 239.0.0.0 netmask 255.0.0.0 $lan_if
|
2007-01-10 11:41:14 +00:00
|
|
|
}
|