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

Hannu Nyman hannu.nyman at iki.fi
Sat Apr 25 05:00:19 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'.

You got the original script's logic wrong, as you mixed "enable" and "enabled".
"enable" activates the service, while "enabled" is just a query if the 
service is active.
/etc/rc.common defines both of them.

The logic is: query if miniupnpd is active, and if yes, then stop and disable it.

The feature has originally been added as a security feature to luci-app-upnp. 
But why it is set in luci, not in the actual miniupnpd package in the routing 
repo?

It originates from 2008: 
https://github.com/openwrt/luci/commit/66fa0eb0e8e206d26e16615941c60b22b5004649
modified in 2011: 
https://github.com/openwrt/luci/commit/6811edb3d9fe289190fbc7337d372027a655daf8
_______________________________________________
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