From 9d8f39a165bdaee77f69ddc108ed19f22248e360 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 24 Mar 2015 14:06:27 +0100 Subject: [PATCH] rc: do not signal init(8) on shutdown invoke --- src/etc/rc.halt | 6 +----- src/etc/rc.initial.halt | 1 - src/etc/rc.initial.reboot | 1 - src/etc/rc.reboot | 6 +----- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/etc/rc.halt b/src/etc/rc.halt index 2a526dd30..bde56f6a2 100755 --- a/src/etc/rc.halt +++ b/src/etc/rc.halt @@ -5,16 +5,12 @@ if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then exit -1 fi -sleep 1 - /usr/local/etc/rc.backup_rrd /usr/local/etc/rc.backup_dhcpleases -sleep 1 - SHUTDOWN=/sbin/shutdown if [ -f /sbin/shutdown.old ]; then SHUTDOWN=/sbin/shutdown.old fi -$SHUTDOWN -p now +${SHUTDOWN} -op now diff --git a/src/etc/rc.initial.halt b/src/etc/rc.initial.halt index 01fc88cab..8debbf60e 100755 --- a/src/etc/rc.initial.halt +++ b/src/etc/rc.initial.halt @@ -38,7 +38,6 @@ echo "This may take a minute, depending on your hardware.\n"; echo "\nDo you want to proceed [y|n]? "; if (strcasecmp(chop(fgets($fp)), 'y') == 0) { - echo "\n{$g['product_name']} will shutdown and halt system now.\n"; system_halt(true); } diff --git a/src/etc/rc.initial.reboot b/src/etc/rc.initial.reboot index 5885dd6c1..f2e48455d 100755 --- a/src/etc/rc.initial.reboot +++ b/src/etc/rc.initial.reboot @@ -39,7 +39,6 @@ echo "This may take a minute, depending on your hardware.\n"; echo "\nDo you want to proceed [y|n]? "; if (strcasecmp(chop(fgets($fp)), 'y') == 0) { - echo "\n{$g['product_name']} is rebooting now.\n\n"; system_reboot(true); } diff --git a/src/etc/rc.reboot b/src/etc/rc.reboot index 1b9bd47b9..187cbfa7a 100755 --- a/src/etc/rc.reboot +++ b/src/etc/rc.reboot @@ -5,16 +5,12 @@ if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then exit 1 fi -sleep 1 - /usr/local/etc/rc.backup_rrd /usr/local/etc/rc.backup_dhcpleases -sleep 1 - SHUTDOWN=/sbin/shutdown if [ -f /sbin/shutdown.old ]; then SHUTDOWN=/sbin/shutdown.old fi -$SHUTDOWN -r now +${SHUTDOWN} -or now