From a2e63b70aa45d530ffa6c5cc009a6c006ebe893e Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Tue, 23 Dec 2014 11:37:27 +0000 Subject: [PATCH] Firmware upgrade is now fully functional --- src/opnsense/scripts/pkg_upgrade.sh | 4 ++-- src/www/system_firmware_check.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/opnsense/scripts/pkg_upgrade.sh b/src/opnsense/scripts/pkg_upgrade.sh index 9dd034bf9..7d3cd6e89 100755 --- a/src/opnsense/scripts/pkg_upgrade.sh +++ b/src/opnsense/scripts/pkg_upgrade.sh @@ -2,12 +2,12 @@ pkg_running=`ps -x | grep "pkg " | grep -v "grep"` if [ "$pkg_running" == "" ]; then - if [ -f /tmp/pkg_upgrade.progress ] + if [ -f /tmp/pkg_upgrade.progress ]; then # Remove leftovers from previous upgrade first rm /tmp/pkg_upgrade.progress fi # 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 else echo 'Upgrade already in progress' diff --git a/src/www/system_firmware_check.php b/src/www/system_firmware_check.php index 306e98d49..851150758 100644 --- a/src/www/system_firmware_check.php +++ b/src/www/system_firmware_check.php @@ -52,7 +52,7 @@ if($_POST['action'] == 'pkg_upgrade') { $shell_output = array(); $shell = new Core\Shell(); // 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' ) {