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

This commit is contained in:
Franco Fichtner 2015-03-24 14:06:27 +01:00
parent 052e38cd2b
commit 9d8f39a165
4 changed files with 2 additions and 12 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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