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
F82104600: D16843.id47097.diff
Thu, Apr 25, 2:19 PM
Unknown Object (File)
Tue, Apr 23, 3:42 AM
Unknown Object (File)
Sat, Apr 20, 1:05 PM
Unknown Object (File)
Fri, Apr 19, 3:36 AM
Unknown Object (File)
Thu, Apr 18, 1:11 PM
Unknown Object (File)
Tue, Apr 16, 9:10 AM
Unknown Object (File)
Feb 5 2024, 3:45 PM
Unknown Object (File)
Dec 17 2023, 6:32 AM

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 Passed
Unit
No Test Coverage
Build Status
Buildable 19042
Build 18673: arc lint + arc unit

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.