miniupnpd: implement an 'enabled' flag
[feed/routing.git] / miniupnpd / files / miniupnpd.init
index 9ac6de2afac33f32e6645da39f1cc63ff431409c..c934a283732b60e357bb75bb13934ae0123a2f6e 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2011 OpenWrt.org
+# Copyright (C) 2006-2014 OpenWrt.org
 
-START=95
+START=94
 STOP=15
 
 SERVICE_USE_PID=1
@@ -68,7 +68,11 @@ start() {
        local extip port usesysuptime conffile serial_number model_number
        local uuid notify_interval presentation_url enable_upnp
        local upnp_lease_file clean_ruleset_threshold clean_ruleset_interval
-        local ipv6_listening_ip
+        local ipv6_listening_ip enabled
+
+       config_get_bool enabled config enabled 1
+
+       [ "$enabled" -gt 0 ] || return 1
 
        config_get extiface config external_iface
        config_get extzone config external_zone