Bug 114059

Summary: [patch] shutdown(8) should fall back to exec reboot/halt when init is not running
Product: Base System Reporter: Stef Walter <stef>
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me Keywords: patch
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Stef Walter 2007-06-27 03:10:04 UTC
When running in a jail or other environment where where init (ie:
process 1) is not running, shutdown should call the reboot/halt commands.
In a jail environment these are often replaced by custom scripts which
handle restarting the jail.

Currently it is possible to call shutdown with the '-o' flag. 

This patch adds adds a fallback if the kill() call fails. The patch also
displays an error message if the kill() call fails for some other reason.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-01-29 12:59:39 UTC
Responsible Changed
From-To: freebsd-bugs->edwin

Handle with mentor
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2008-02-14 10:34:20 UTC
Responsible Changed
From-To: edwin->freebsd-bugs


Give back into the pool until later.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:06 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:36:36 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>