aboutsummaryrefslogtreecommitdiff
path: root/sbin/reboot
diff options
context:
space:
mode:
authorThomas Quinot <thomas@FreeBSD.org>2002-10-06 16:24:36 +0000
committerThomas Quinot <thomas@FreeBSD.org>2002-10-06 16:24:36 +0000
commitcfde77fbdfd1f211b4c4dac1abe1ec4cf26cc5fd (patch)
treeccdc739a7af4e8a3884a09661eb81967d287c18d /sbin/reboot
parentb371c939ce74b0eb0741e9411bd98d624ccebe39 (diff)
downloadsrc-cfde77fbdfd1f211b4c4dac1abe1ec4cf26cc5fd.tar.gz
src-cfde77fbdfd1f211b4c4dac1abe1ec4cf26cc5fd.zip
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)
Notes
Notes: svn path=/head/; revision=104572
Diffstat (limited to 'sbin/reboot')
-rw-r--r--sbin/reboot/reboot.c2
1 files changed, 1 insertions, 1 deletions
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;