#!/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 }