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.
pull/7/head
Darren Kitchen 2015-08-27 18:17:53 -07:00
parent 44bdf9920c
commit bd859a4c8a
1 changed files with 2 additions and 1 deletions

View File

@ -87,6 +87,7 @@ function start {
uci commit upnp_portfwd uci commit upnp_portfwd
fi fi
if [ ! -e "/usr/bin/upnpc" ]; then if [ ! -e "/usr/bin/upnpc" ]; then
opkg update
opkg install miniupnpc opkg install miniupnpc
fi fi
@ -119,7 +120,7 @@ function stop {
} }
function status { function status {
if [ "$(uci get upnp_portfwd.enabled)" == "1" ]; then if [ "$(uci get upnp_portfwd.enabled 2>/dev/null)" == "1" ]; then
echo "1" echo "1"
else else
echo "0" echo "0"