summaryrefslogtreecommitdiffstats
path: root/etc/rc.firmware
diff options
context:
space:
mode:
Diffstat (limited to 'etc/rc.firmware')
-rwxr-xr-xetc/rc.firmware16
1 files changed, 14 insertions, 2 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware
index f752335..a7cbfaf 100755
--- a/etc/rc.firmware
+++ b/etc/rc.firmware
@@ -83,6 +83,8 @@ binary_update() {
ERR_F="/tmp/bdiff.log"
rm ${ERR_F} 2>/dev/null
/bin/mkdir /tmp/patched /tmp/patches 2>>${ERR_F}
+ # Save the old shutdown binary. If we switch from i386 to amd64 (or back) the reboot binary won't run at the end since it doesn't match up.
+ /bin/cp -p /sbin/shutdown /sbin/shutdown.old
backup_chflags
remove_chflags
cd /tmp/patches
@@ -154,7 +156,8 @@ pfSenseNanoBSDupgrade)
echo "NanoBSD Firmware upgrade in progress..." >> /conf/upgrade_log.txt 2>&1
echo "NanoBSD Firmware upgrade in progress..." | wall
-
+ /etc/rc.firmware_notify -e -g -m "NanoBSD Firmware upgrade in progress..."
+
# backup config
/bin/mkdir -p /tmp/configbak
cp -Rp /conf/* /tmp/configbak 2>/dev/null
@@ -356,6 +359,10 @@ pfSenseNanoBSDupgrade)
/etc/rc.conf_mount_ro
/bin/sync
+ echo "NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds." >> /conf/upgrade_log.txt 2>&1
+ echo "NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds." | wall
+ /etc/rc.firmware_notify -e -g -m "NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds."
+
sleep 10
rm -f /var/run/firmwarelock.dirty
@@ -400,7 +407,8 @@ pfSenseupgrade)
echo "Firmware upgrade in progress..." >> /conf/upgrade_log.txt 2>&1
echo "Firmware upgrade in progress..." | wall
-
+ /etc/rc.firmware_notify -e -g -m "Firmware upgrade in progress..."
+
# backup config
/bin/mkdir -p /tmp/configbak
cp -Rp /conf/* /tmp/configbak 2>/dev/null
@@ -464,6 +472,10 @@ pfSenseupgrade)
rm -f /var/run/firmware.lock
/bin/sync
+ echo "Firmware upgrade is complete. Rebooting in 10 seconds." >> /conf/upgrade_log.txt 2>&1
+ echo "Firmware upgrade is complete. Rebooting in 10 seconds." | wall
+ /etc/rc.firmware_notify -e -g -m "Firmware upgrade is complete. Rebooting in 10 seconds."
+
# Sleep and allow disks to catch up
sleep 10
OpenPOWER on IntegriCloud