From: Jo-Philipp Wich Date: Sun, 5 Feb 2012 15:22:32 +0000 (+0000) Subject: linuxigd: merge r29070 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=189431673e7de7ca73d14ddaf10316d09c2a3cd9;p=openwrt%2Fsvn-archive%2Fpackages.git linuxigd: merge r29070 SVN-Revision: 30214 --- diff --git a/net/linuxigd/Makefile b/net/linuxigd/Makefile index 6fc5c153b..e8b2b32a5 100644 --- a/net/linuxigd/Makefile +++ b/net/linuxigd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org # Copyright (C) 2006 loswillios # # This is free software, licensed under the GNU General Public License v2. @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=linuxigd PKG_VERSION:=1.0 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/linux-igd diff --git a/net/linuxigd/files/upnpd.init b/net/linuxigd/files/upnpd.init index e250305f8..832768f63 100644 --- a/net/linuxigd/files/upnpd.init +++ b/net/linuxigd/files/upnpd.init @@ -1,29 +1,25 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org # Copyright (C) 2006 loswillios + START=65 include /lib/network -scan_interfaces -config_get WAN wan ifname -config_get LAN lan ifname start() { - echo -n "Starting UPnP: " - route add -net 239.0.0.0 netmask 255.0.0.0 $LAN - upnpd $WAN $LAN - echo "OK" + scan_interfaces + config_get wan_if 'wan' 'ifname' + config_get lan_if 'lan' 'ifname' + [ -n "$wan_if" ] || return 1 + + [ -n "$lan_if" ] && route add -net 239.0.0.0 netmask 255.0.0.0 $lan_if + service_start /usr/sbin/upnpd $wan_if $lan_if } stop() { - echo -n "Stopping UPnP: " - route del -net 239.0.0.0 netmask 255.0.0.0 $LAN - killall upnpd - echo "OK" -} + scan_interfaces + config_get lan_if 'lan' 'ifname' -restart() { - stop - sleep 5 - start + service_stop /usr/sbin/upnpd + [ -n "$lan_if" ] && route del -net 239.0.0.0 netmask 255.0.0.0 $lan_if }