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)