Currently, when reboot is invoked with the '-p' command line flag (powerdown), it performs a shutdown with RB_HALT|RB_POWEROFF. In some situations, it can be useful to try to perform a poweroff, but reboot if it fails (e.g. when you are shutting down the system as a result of a power failure, you want the system to reboot, *not* stay down, if power was restored after the start of the shutdown procedure). It would be nice if reboot was changed to pass only RB_POWEROFF (without RB_HALT) when invoked with '-p'. Of course halt(8) whould be unaffected and still pass RB_HALT|RB_POWEROFF when invoked as halt -p.
What do others think of this change: --- reboot.c Thu Aug 2 12:01:20 2001 +++ /tmp/reboot.c Wed Dec 26 13:03:45 2001 @@ -93,7 +93,7 @@ break; case 'p': pflag = 1; - howto |= (RB_POWEROFF | RB_HALT); + howto |= RB_POWEROFF; break; case 'q': qflag = 1; -- [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message