From bd859a4c8ac332f1cff1710fd551ba59627b03a9 Mon Sep 17 00:00:00 2001 From: Darren Kitchen Date: Thu, 27 Aug 2015 18:17:53 -0700 Subject: [PATCH] Fixes opkg install and status issue Fixes install issue where opkg update must be completed before opkg install. Removes "uci: No entry found" error if service hasn't started from status function. --- modules/upnp-portfwd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/upnp-portfwd b/modules/upnp-portfwd index 47bd4fa..c322ab9 100644 --- a/modules/upnp-portfwd +++ b/modules/upnp-portfwd @@ -87,6 +87,7 @@ function start { uci commit upnp_portfwd fi if [ ! -e "/usr/bin/upnpc" ]; then + opkg update opkg install miniupnpc fi @@ -119,7 +120,7 @@ function stop { } function status { - if [ "$(uci get upnp_portfwd.enabled)" == "1" ]; then + if [ "$(uci get upnp_portfwd.enabled 2>/dev/null)" == "1" ]; then echo "1" else echo "0"