summaryrefslogtreecommitdiffstats
path: root/src/usr/local/sbin/pfSense-upgrade
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-11-13 15:22:36 -0200
committerRenato Botelho <renato@netgate.com>2015-11-13 15:26:45 -0200
commitd86a6c40d92534199b5b558816d1fed45162fb13 (patch)
tree08423e716c0b423cca3a961fe1c5c50e4c69398f /src/usr/local/sbin/pfSense-upgrade
parentb0d77d8fa6306dd4b23ab6a4332a79003376a756 (diff)
downloadpfsense-d86a6c40d92534199b5b558816d1fed45162fb13.zip
pfsense-d86a6c40d92534199b5b558816d1fed45162fb13.tar.gz
Wait 10 seconds before reboot, also notify admin
Diffstat (limited to 'src/usr/local/sbin/pfSense-upgrade')
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index eeee2b8..f39a0a3 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -319,7 +319,10 @@ pkg_upgrade() {
fi
fi
switch_active_nanobsd_partition
- /etc/rc.reboot &
+ _echo "Upgrade is complete. Rebooting in 10 seconds."
+ echo "Upgrade is complete. Rebooting in 10 seconds." | wall
+ /etc/rc.notify_message -e -g -m "Upgrade is complete. Rebooting in 10 seconds."
+ (sleep 10 && /etc/rc.reboot) &
_exit 0
fi
@@ -351,8 +354,10 @@ pkg_upgrade() {
next_stage=2
if [ -n "${need_reboot}" -a "${platform}" != "nanobsd" ]; then
- _echo "Rebooting..."
- /etc/rc.reboot &
+ _echo "Upgrade is complete. Rebooting in 10 seconds."
+ echo "Upgrade is complete. Rebooting in 10 seconds." | wall
+ /etc/rc.notify_message -e -g -m "Upgrade is complete. Rebooting in 10 seconds."
+ (sleep 10 && /etc/rc.reboot) &
_exit 0
fi
fi
@@ -381,8 +386,10 @@ pkg_upgrade() {
if [ -n "${need_reboot}" -a "${platform}" = "nanobsd" ]; then
switch_active_nanobsd_partition
- _echo "Rebooting..."
- /etc/rc.reboot &
+ _echo "Upgrade is complete. Rebooting in 10 seconds."
+ echo "Upgrade is complete. Rebooting in 10 seconds." | wall
+ /etc/rc.notify_message -e -g -m "Upgrade is complete. Rebooting in 10 seconds."
+ (sleep 10 && /etc/rc.reboot) &
_exit 0
fi
OpenPOWER on IntegriCloud