Commit a2e63b70 authored by Charlie Root's avatar Charlie Root

Firmware upgrade is now fully functional

parent 814ee488
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
pkg_running=`ps -x | grep "pkg " | grep -v "grep"` pkg_running=`ps -x | grep "pkg " | grep -v "grep"`
if [ "$pkg_running" == "" ]; then if [ "$pkg_running" == "" ]; then
if [ -f /tmp/pkg_upgrade.progress ] if [ -f /tmp/pkg_upgrade.progress ]; then
# Remove leftovers from previous upgrade first # Remove leftovers from previous upgrade first
rm /tmp/pkg_upgrade.progress rm /tmp/pkg_upgrade.progress
fi fi
# start pkg upgrade # start pkg upgrade
pkg upgrade -n > /tmp/pkg_upgrade.progress & # Need to st this to -y for production, now set to -n for testing purpose pkg upgrade -y > /tmp/pkg_upgrade.progress &
echo '***DONE***' >> /tmp/pkg_upgrade.progress echo '***DONE***' >> /tmp/pkg_upgrade.progress
else else
echo 'Upgrade already in progress' echo 'Upgrade already in progress'
......
...@@ -52,7 +52,7 @@ if($_POST['action'] == 'pkg_upgrade') { ...@@ -52,7 +52,7 @@ if($_POST['action'] == 'pkg_upgrade') {
$shell_output = array(); $shell_output = array();
$shell = new Core\Shell(); $shell = new Core\Shell();
// execute shell command and collect (only valid) info into named array // execute shell command and collect (only valid) info into named array
$shell->exec("/usr/local/opnsense/scripts/pkg_upgrade.sh &",false,false,$shell_output); $shell->exec("/usr/local/opnsense/scripts/pkg_upgrade.sh",false,false,$shell_output);
} }
if($_POST['action'] == 'update_status' ) { if($_POST['action'] == 'update_status' ) {
......
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