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)
This commit is contained in:
Thomas Quinot 2002-10-06 16:24:36 +00:00
parent b371c939ce
commit cfde77fbdf
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=104572

View File

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