Commit 9d8f39a1 authored by Franco Fichtner's avatar Franco Fichtner

rc: do not signal init(8) on shutdown invoke

parent 052e38cd
...@@ -5,16 +5,12 @@ if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then ...@@ -5,16 +5,12 @@ if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
exit -1 exit -1
fi fi
sleep 1
/usr/local/etc/rc.backup_rrd /usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases /usr/local/etc/rc.backup_dhcpleases
sleep 1
SHUTDOWN=/sbin/shutdown SHUTDOWN=/sbin/shutdown
if [ -f /sbin/shutdown.old ]; then if [ -f /sbin/shutdown.old ]; then
SHUTDOWN=/sbin/shutdown.old SHUTDOWN=/sbin/shutdown.old
fi fi
$SHUTDOWN -p now ${SHUTDOWN} -op now
...@@ -38,7 +38,6 @@ echo "This may take a minute, depending on your hardware.\n"; ...@@ -38,7 +38,6 @@ echo "This may take a minute, depending on your hardware.\n";
echo "\nDo you want to proceed [y|n]? "; echo "\nDo you want to proceed [y|n]? ";
if (strcasecmp(chop(fgets($fp)), 'y') == 0) { if (strcasecmp(chop(fgets($fp)), 'y') == 0) {
echo "\n{$g['product_name']} will shutdown and halt system now.\n";
system_halt(true); system_halt(true);
} }
......
...@@ -39,7 +39,6 @@ echo "This may take a minute, depending on your hardware.\n"; ...@@ -39,7 +39,6 @@ echo "This may take a minute, depending on your hardware.\n";
echo "\nDo you want to proceed [y|n]? "; echo "\nDo you want to proceed [y|n]? ";
if (strcasecmp(chop(fgets($fp)), 'y') == 0) { if (strcasecmp(chop(fgets($fp)), 'y') == 0) {
echo "\n{$g['product_name']} is rebooting now.\n\n";
system_reboot(true); system_reboot(true);
} }
......
...@@ -5,16 +5,12 @@ if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then ...@@ -5,16 +5,12 @@ if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
exit 1 exit 1
fi fi
sleep 1
/usr/local/etc/rc.backup_rrd /usr/local/etc/rc.backup_rrd
/usr/local/etc/rc.backup_dhcpleases /usr/local/etc/rc.backup_dhcpleases
sleep 1
SHUTDOWN=/sbin/shutdown SHUTDOWN=/sbin/shutdown
if [ -f /sbin/shutdown.old ]; then if [ -f /sbin/shutdown.old ]; then
SHUTDOWN=/sbin/shutdown.old SHUTDOWN=/sbin/shutdown.old
fi fi
$SHUTDOWN -r now ${SHUTDOWN} -or now
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment