Page MenuHomeFreeBSD

development(7): Replace "reboot" with "shutdown -r now"
ClosedPublic

Authored by 0mp on Aug 22 2018, 2:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 5 2024, 3:45 PM
Unknown Object (File)
Dec 17 2023, 6:32 AM
Unknown Object (File)
Nov 7 2023, 8:46 AM
Unknown Object (File)
Oct 16 2023, 11:59 PM
Unknown Object (File)
Oct 15 2023, 4:56 AM
Unknown Object (File)
Oct 13 2023, 9:34 PM
Unknown Object (File)
Oct 12 2023, 6:51 AM
Unknown Object (File)
Sep 22 2023, 8:22 PM

Details

Summary

Commit message:

We generally document shutdown(8) instead of reboot(8) as it's better for
interactive use.

Reported by: eadler

Do you have any comments on what should be the reason in the commit message? I've got a feeling that the current message is not very informative.


Note: I'll bump Dd before committing.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Do you have any comments on what should be the reason in the commit message?

In modern FreeBSD is matterns a lot less, its mostly just convention. One minor thing is that shutdown produces a global message, while reboot does not. I believe that historically, some versions of reboot did not do appropriate safe shutdown checks and just rebooted.

Its also just consistency: for example https://www.freebsd.org/doc/handbook/boot-shutdown.html documents shutdown

This revision is now accepted and ready to land.Aug 26 2018, 7:33 AM
jilles added a subscriber: jilles.

There is actually another important difference between reboot and shutdown -r now: reboot does not run /etc/rc.shutdown. This is because reboot has its own shutdown procedure and does not signal init like init 6 and shutdown -r now do (except in the case of rerooting via reboot -r).

A few years ago I proposed changing reboot's default to signalling init (preserving reboot -q which just invokes the reboot system call), but this was not accepted. Perhaps this can be tried again for 13.0.

Don't forget to update .Dd.

0mp added subscribers: krion, mat.

Thank you, @eadler & @jilles.

@krion, @mat: may I ask you for an approval to commit? Then I'll contact release engineers for the final approval.

0mp requested review of this revision.Aug 26 2018, 11:32 AM
This revision is now accepted and ready to land.Aug 26 2018, 11:41 AM

There is actually another important difference between reboot and shutdown -r now: reboot does not run /etc/rc.shutdown. This is because reboot has its own shutdown procedure and does not signal init like init 6 and shutdown -r now do (except in the case of rerooting via reboot -r).

I completely forgot about this...

This revision was automatically updated to reflect the committed changes.