Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147581702
D46559.1783805856.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46559.1783805856.diff
View Options
diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8
--- a/sbin/reboot/reboot.8
+++ b/sbin/reboot/reboot.8
@@ -41,7 +41,7 @@
.Op Fl k Ar kernel
.Op Fl o Ar options
.Nm
-.Op Fl cDdflNnpqr
+.Op Fl cDdflNnqr
.Op Fl e Ar variable=value
.Op Fl k Ar kernel
.Op Fl o Ar options
@@ -156,11 +156,7 @@
.It Fl p
The system will turn off the power if it can.
If the power down action fails, the system
-will halt or reboot normally, depending on whether
-.Nm halt
-or
-.Nm
-was called.
+will halt normally.
.It Fl q
The system is halted or restarted quickly and ungracefully, and only
the flushing of the file system cache is performed (if the
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -306,6 +306,9 @@
errx(1, "-r cannot be used with -c, -d, -n, or -p");
if ((howto & RB_REROOT) != 0 && kernel != NULL)
errx(1, "-r and -k cannot be used together, there is no next kernel");
+ if ((howto & RB_POWEROFF) != 0 && dohalt != true)
+ errx(1, "cannot poweroff (-p) when rebooting; "
+ "must power cycle (-c) or halt instead");
if (Dflag) {
if (unlink(PATH_NEXTBOOT) != 0 && errno != ENOENT)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 11, 9:37 PM (5 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29084063
Default Alt Text
D46559.1783805856.diff (1 KB)
Attached To
Mode
D46559: reboot: powering off and rebooting at the same time doesn't make sense
Attached
Detach File
Event Timeline
Log In to Comment