Bug 114059 - [patch] shutdown(8) should fall back to exec reboot/halt when init is not running
Summary: [patch] shutdown(8) should fall back to exec reboot/halt when init is not run...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2007-06-27 03:10 UTC by Stef Walter
Modified: 2017-12-31 22:37 UTC (History)
0 users

See Also:

file.diff (1.18 KB, patch)
2007-06-27 03:10 UTC, Stef Walter
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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 2008-01-29 12:59:39 UTC
Responsible Changed
From-To: freebsd-bugs->edwin

Handle with mentor
Comment 2 Edwin Groothuis freebsd_committer 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