[OpenWrt-Devel] [PATCH] luci:miniupnpd Fix enabled/disabled behaviour on first boot/upgrade

Kevin Darbyshire-Bryant kevin at darbyshire-bryant.me.uk
Sat Apr 25 04:40:26 EDT 2015


miniupnpd service was always disabled after firmware upgrade.  Original luci default logic
was 'enable miniupnpd and if that succeeds, stop and then disable the service'.  It should be
'enable miniupnpd and if that fails, stop & disable the service'.

Signed-off-by: Kevin Darbyshire-Bryant <kevin at darbyshire-bryant.me.uk>


diff --git a/applications/luci-app-upnp/root/etc/uci-defaults/luci-upnp b/applications/luci-app-upnp/root/etc/uci-defaults/luci-upnp
index fe22a3e..4c45f3c 100755
--- a/applications/luci-app-upnp/root/etc/uci-defaults/luci-upnp
+++ b/applications/luci-app-upnp/root/etc/uci-defaults/luci-upnp
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-/etc/init.d/miniupnpd enabled && {
+/etc/init.d/miniupnpd enabled || {
     /etc/init.d/miniupnpd stop
     /etc/init.d/miniupnpd disable
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4791 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150425/539acadb/attachment.p7s>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list