summaryrefslogtreecommitdiffstats
path: root/src/etc/rc.reboot
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-12-29 12:15:25 -0200
committerRenato Botelho <renato@netgate.com>2016-12-29 12:15:25 -0200
commitb34c29cbd92318c7986b8ee2d02cec23d9d35ce2 (patch)
treedb3210a0b98d1387b5417237d5f7b33ee6bcd047 /src/etc/rc.reboot
parent016a0b252eaa4dcbc6c09142393b3d1e16f49908 (diff)
downloadpfsense-b34c29cbd92318c7986b8ee2d02cec23d9d35ce2.zip
pfsense-b34c29cbd92318c7986b8ee2d02cec23d9d35ce2.tar.gz
Teach /etc/rc.reboot to reroot when -r parameter is specified
Diffstat (limited to 'src/etc/rc.reboot')
-rwxr-xr-xsrc/etc/rc.reboot8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/etc/rc.reboot b/src/etc/rc.reboot
index 5acf81a..e48f927 100755
--- a/src/etc/rc.reboot
+++ b/src/etc/rc.reboot
@@ -23,6 +23,11 @@ if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
exit 1
fi
+unset REROOT
+if [ "${1}" = "-r" ]; then
+ REROOT=${1}
+fi
+
sleep 1
# Read product_name from $g, defaults to pfSense
@@ -43,5 +48,4 @@ fi
sleep 1
-SHUTDOWN=/sbin/shutdown
-$SHUTDOWN -r now
+/sbin/reboot ${REROOT} now
OpenPOWER on IntegriCloud