Commit f05b35d9 authored by Franco Fichtner's avatar Franco Fichtner

firmware: oddly enough, this reversed order is the correct one

parent 3b630722
...@@ -37,7 +37,7 @@ fi ...@@ -37,7 +37,7 @@ fi
: > ${PKG_PROGRESS_FILE} : > ${PKG_PROGRESS_FILE}
echo "***GOT REQUEST TO INSTALL: $PACKAGE***" >> ${PKG_PROGRESS_FILE} echo "***GOT REQUEST TO INSTALL: $PACKAGE***" >> ${PKG_PROGRESS_FILE}
pkg install -y $PACKAGE 2>&1 >> ${PKG_PROGRESS_FILE} pkg install -y $PACKAGE >> ${PKG_PROGRESS_FILE} 2>&1
pkg autoremove -y 2>&1 >> ${PKG_PROGRESS_FILE} pkg autoremove -y >> ${PKG_PROGRESS_FILE} 2>&1
pkg clean -ya 2>&1 >> ${PKG_PROGRESS_FILE} pkg clean -ya >> ${PKG_PROGRESS_FILE} 2>&1
echo '***DONE***' >> ${PKG_PROGRESS_FILE} echo '***DONE***' >> ${PKG_PROGRESS_FILE}
...@@ -37,5 +37,5 @@ fi ...@@ -37,5 +37,5 @@ fi
: > ${PKG_PROGRESS_FILE} : > ${PKG_PROGRESS_FILE}
echo "***GOT REQUEST TO LOCK: $PACKAGE***" >> ${PKG_PROGRESS_FILE} echo "***GOT REQUEST TO LOCK: $PACKAGE***" >> ${PKG_PROGRESS_FILE}
pkg lock -y $PACKAGE 2>&1 >> ${PKG_PROGRESS_FILE} pkg lock -y $PACKAGE >> ${PKG_PROGRESS_FILE} 2>&1
echo '***DONE***' >> ${PKG_PROGRESS_FILE} echo '***DONE***' >> ${PKG_PROGRESS_FILE}
...@@ -37,7 +37,7 @@ fi ...@@ -37,7 +37,7 @@ fi
: > ${PKG_PROGRESS_FILE} : > ${PKG_PROGRESS_FILE}
echo "***GOT REQUEST TO REINSTALL: $PACKAGE***" >> ${PKG_PROGRESS_FILE} echo "***GOT REQUEST TO REINSTALL: $PACKAGE***" >> ${PKG_PROGRESS_FILE}
pkg install -yf $PACKAGE 2>&1 >> ${PKG_PROGRESS_FILE} pkg install -yf $PACKAGE >> ${PKG_PROGRESS_FILE} 2>&1
pkg autoremove -y 2>&1 >> ${PKG_PROGRESS_FILE} pkg autoremove -y >> ${PKG_PROGRESS_FILE} 2>&1
pkg clean -ya 2>&1 >> ${PKG_PROGRESS_FILE} pkg clean -ya >> ${PKG_PROGRESS_FILE} 2>&1
echo '***DONE***' >> ${PKG_PROGRESS_FILE} echo '***DONE***' >> ${PKG_PROGRESS_FILE}
...@@ -37,7 +37,7 @@ fi ...@@ -37,7 +37,7 @@ fi
: > ${PKG_PROGRESS_FILE} : > ${PKG_PROGRESS_FILE}
echo "***GOT REQUEST TO REINSTALL: $PACKAGE***" >> ${PKG_PROGRESS_FILE} echo "***GOT REQUEST TO REINSTALL: $PACKAGE***" >> ${PKG_PROGRESS_FILE}
pkg remove -y $PACKAGE 2>&1 >> ${PKG_PROGRESS_FILE} pkg remove -y $PACKAGE >> ${PKG_PROGRESS_FILE} 2>&1
pkg autoremove -y 2>&1 >> ${PKG_PROGRESS_FILE} pkg autoremove -y >> ${PKG_PROGRESS_FILE} 2>&1
pkg clean -ya 2>&1 >> ${PKG_PROGRESS_FILE} pkg clean -ya >> ${PKG_PROGRESS_FILE} 2>&1
echo '***DONE***' >> ${PKG_PROGRESS_FILE} echo '***DONE***' >> ${PKG_PROGRESS_FILE}
...@@ -37,5 +37,5 @@ fi ...@@ -37,5 +37,5 @@ fi
: > ${PKG_PROGRESS_FILE} : > ${PKG_PROGRESS_FILE}
echo "***GOT REQUEST TO UNLOCK: $PACKAGE***" >> ${PKG_PROGRESS_FILE} echo "***GOT REQUEST TO UNLOCK: $PACKAGE***" >> ${PKG_PROGRESS_FILE}
pkg unlock -y $PACKAGE 2>&1 >> ${PKG_PROGRESS_FILE} pkg unlock -y $PACKAGE >> ${PKG_PROGRESS_FILE} 2>&1
echo '***DONE***' >> ${PKG_PROGRESS_FILE} echo '***DONE***' >> ${PKG_PROGRESS_FILE}
...@@ -41,17 +41,17 @@ echo "***GOT REQUEST TO UPGRADE: $PACKAGE***" >> ${PKG_PROGRESS_FILE} ...@@ -41,17 +41,17 @@ echo "***GOT REQUEST TO UPGRADE: $PACKAGE***" >> ${PKG_PROGRESS_FILE}
if [ "$PACKAGE" == "all" ]; then if [ "$PACKAGE" == "all" ]; then
# update all installed packages # update all installed packages
opnsense-update -p 2>&1 >> ${PKG_PROGRESS_FILE} opnsense-update -p >> ${PKG_PROGRESS_FILE} 2>&1
# restart the web server # restart the web server
/usr/local/etc/rc.restart_webgui 2>&1 >> ${PKG_PROGRESS_FILE} /usr/local/etc/rc.restart_webgui >> ${PKG_PROGRESS_FILE} 2>&1
# if we can update base, we'll do that as well # if we can update base, we'll do that as well
if opnsense-update -c; then if opnsense-update -c; then
if opnsense-update -bk 2>&1 >> ${PKG_PROGRESS_FILE}; then if opnsense-update -bk >> ${PKG_PROGRESS_FILE} 2>&1; then
REBOOT=1 REBOOT=1
fi fi
fi fi
elif [ "$PACKAGE" == "pkg" ]; then elif [ "$PACKAGE" == "pkg" ]; then
pkg upgrade -y $PACKAGE 2>&1 >> ${PKG_PROGRESS_FILE} pkg upgrade -y $PACKAGE >> ${PKG_PROGRESS_FILE} 2>&1
echo "*** PLEASE CHECK FOR MORE UPGRADES" echo "*** PLEASE CHECK FOR MORE UPGRADES"
else else
echo "Cannot update $PACKAGE" >> ${PKG_PROGRESS_FILE} echo "Cannot update $PACKAGE" >> ${PKG_PROGRESS_FILE}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment