From cfde77fbdfd1f211b4c4dac1abe1ec4cf26cc5fd Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Sun, 6 Oct 2002 16:24:36 +0000 Subject: [PATCH] Set only the RB_POWEROFF flag (not the RB_HALT flag) when '-p' is used on the reboot(8) command line. This is intended for use when you want to attempt a power down action, but you want the system to reboot (not halt) if the power down action fails. This is typically useful when the power-off action performed by the kernel consists in signalling an uninterrupted power supply that it should shut down its inverter if mains power has not returned. The behaviour of shutdown(8) and init(8) is not modified; only the behaviour of invoking 'reboot -p' manually is modified, and then only in the case when a power-down action fails. Sounded reasonable to: phk Approved by: roberto (mentor) --- sbin/reboot/reboot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 0c85c15be5d2..b30582d2116f 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -98,7 +98,7 @@ main(int argc, char *argv[]) break; case 'p': pflag = 1; - howto |= (RB_POWEROFF | RB_HALT); + howto |= RB_POWEROFF; break; case 'q': qflag = 1;