bb93516488
git-svn-id: svn://svn.openwrt.org/openwrt/packages@31972 3c298f89-4303-0410-b956-a3cf2f4a3e73
25 lines
502 B
Bash
25 lines
502 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2012 OpenWrt.org
|
|
# Copyright (C) 2006 loswillios
|
|
|
|
START=65
|
|
|
|
start() {
|
|
. /lib/functions/network.sh
|
|
|
|
network_get_device wan_if 'wan' || return 1
|
|
network_get_device lan_if 'lan' || return 1
|
|
|
|
route add -net 239.0.0.0 netmask 255.0.0.0 $lan_if
|
|
service_start /usr/sbin/upnpd $wan_if $lan_if
|
|
}
|
|
|
|
stop() {
|
|
. /lib/functions/network.sh
|
|
|
|
service_stop /usr/sbin/upnpd
|
|
|
|
network_get_device lan_if 'lan' && \
|
|
route del -net 239.0.0.0 netmask 255.0.0.0 $lan_if
|
|
}
|