summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2015-12-07 11:14:16 +0545
committerPhil Davis <phil.davis@inf.org>2015-12-07 11:14:16 +0545
commit6ae579b56038775641a1ab3b9ea56a05d244955c (patch)
tree43cdf031b355fbb32320fc3231d8984eab97e3ea /etc
parent2bfa7dbfb4fe8981c84d03d417b7c486a0973ea5 (diff)
downloadpfsense-6ae579b56038775641a1ab3b9ea56a05d244955c.zip
pfsense-6ae579b56038775641a1ab3b9ea56a05d244955c.tar.gz
Redmine #4279 Package reinstall displayed when shutting down before upgrade
Use a different flag file to indicate that a package reinstall is required after a reboot is done first. This avoids the possibility that the user navigates in the webGUI during the time while the shutdown is in progress and is accidentally presented with the reinstall all packages GUI button. Early in rc.bootup switch the flag file to use its ordinary name, so that all subsequent code in boot scripts and webGUI will work as it already does to handle the package reinstall and notifying the user that a package reinstall is about to be done or in progress...
Diffstat (limited to 'etc')
-rwxr-xr-xetc/rc.bootup6
-rwxr-xr-xetc/rc.firmware2
2 files changed, 7 insertions, 1 deletions
diff --git a/etc/rc.bootup b/etc/rc.bootup
index d2f0b82..f690f00 100755
--- a/etc/rc.bootup
+++ b/etc/rc.bootup
@@ -141,6 +141,12 @@ system_check_reset_button();
if (file_exists("/root/firmware.tgz"))
unlink("/root/firmware.tgz");
+/* Reinstall of packages after reboot has been requested */
+if (file_exists('/conf/needs_package_sync_after_reboot')) {
+ touch('/conf/needs_package_sync');
+ @unlink('/conf/needs_package_sync_after_reboot');
+}
+
/* start devd (dhclient now uses it) */
echo "Starting device manager (devd)...";
mute_kernel_msgs();
diff --git a/etc/rc.firmware b/etc/rc.firmware
index 0b6f3ed..e5f8310 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -365,7 +365,7 @@ pfSenseNanoBSDupgrade)
echo "" >> /conf/upgrade_log.txt
# Trigger a package reinstallation on reboot
- touch /conf/needs_package_sync
+ touch /conf/needs_package_sync_after_reboot
# remount /cf ro
/etc/rc.conf_mount_ro
OpenPOWER on IntegriCloud