Page MenuHomeFreeBSD

reboot(8): add support for noshutdown
ClosedPublic

Authored by kib on Jul 11 2025, 12:10 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Aug 13, 5:05 PM
Unknown Object (File)
Wed, Aug 13, 10:48 AM
Unknown Object (File)
Tue, Jul 29, 12:23 AM
Unknown Object (File)
Mon, Jul 28, 4:16 PM
Unknown Object (File)
Mon, Jul 28, 2:49 PM
Unknown Object (File)
Mon, Jul 28, 5:58 AM
Unknown Object (File)
Mon, Jul 28, 3:20 AM
Unknown Object (File)
Mon, Jul 28, 12:17 AM
Subscribers

Details

Summary
Similar to shutdown(8), refuse to reboot if /var/run/noshutdown is
present.  The -F option can be used to force operation.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.Jul 11 2025, 12:10 AM

"The -F option can be used to force operation."

For the commit message; it seems it is -f not -F

And thanks a lot!

sbin/reboot/reboot.8
28

Should bump this before commit as well

121

conditions

This should be -F, not -f. The latter is commonly used for 'fast' elsewhere should we harmonize reboot with other systems as has oft been talked about... I don't want this feature to get in the way of that... I also think -f today means no sync.

I have 80% of the work done to implement this shift based on the last 3 threads in arch@, the forums, etc

sbin/reboot/reboot.8
113

F not f

sbin/reboot/reboot.8
121

s/the flag/this flag/

kib marked 3 inline comments as done.Jul 11 2025, 2:27 AM
In D51241#1170066, @imp wrote:

This should be -F, not -f. The latter is commonly used for 'fast' elsewhere should we harmonize reboot with other systems as has oft been talked about... I don't want this feature to get in the way of that... I also think -f today means no sync.

I have 80% of the work done to implement this shift based on the last 3 threads in arch@, the forums, etc

reboot(8) already has -f, and I used it to add more 'enforce-ability' meaning to it. You added it, and it means ignore invalid next kernel.

sbin/reboot/reboot.8
113

I used existing -f option, adding more meaning to it.

In D51241#1174683, @kib wrote:

Ping?

That ping for @imp about the command line option or general?

In D51241#1174768, @bz wrote:
In D51241#1174683, @kib wrote:

Ping?

That ping for @imp about the command line option or general?

Well, I read the @imp response as blocking my changes for the reason that -f is reserved for something else. I replied that the flag is already used and I added an additional functionality under it.
So I want some clearance there.

In D51241#1174770, @kib wrote:
In D51241#1174768, @bz wrote:
In D51241#1174683, @kib wrote:

Ping?

That ping for @imp about the command line option or general?

Well, I read the @imp response as blocking my changes for the reason that -f is reserved for something else. I replied that the flag is already used and I added an additional functionality under it.
So I want some clearance there.

I'm sorry, was going to comment and got busy after figuring things out: Yes. go ahead with this interface. There'd already be a small semantic change in -f with what I want to do. This won't make it worse.

This revision is now accepted and ready to land.Mon, Jul 21, 4:11 PM
This revision was automatically updated to reflect the committed changes.