Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jan 2011 15:57:35 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Warner Losh <imp@bsdimp.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@freebsd.org>
Subject:   Re: svn commit: r216823 - head/sbin/shutdown
Message-ID:  <20110101145734.GA72435@stack.nl>
In-Reply-To: <4D1E51BD.8090707@bsdimp.com>
References:  <201012301806.oBUI6VcW046731@svn.freebsd.org> <20101231144308.GA55052@stack.nl> <4D1E51BD.8090707@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 31, 2010 at 02:57:17PM -0700, Warner Losh wrote:
> On 12/31/2010 07:43, Jilles Tjoelker wrote:
> > On Thu, Dec 30, 2010 at 06:06:31PM +0000, Pawel Jakub Dawidek wrote:
> >> Author: pjd
> >> Date: Thu Dec 30 18:06:31 2010
> >> New Revision: 216823
> >> URL: http://svn.freebsd.org/changeset/base/216823
> >> Log:
> >>    For compatibility with Linux and Solaris add poweroff(8).
> >>    It is implemented as a hard link to shutdown(8) and it is equivalent of:
> >>    	# shutdown -p now
> > If we go that way, then for consistency reboot(8) and halt(8) should
> > also be equivalent to calling shutdown -r now and shutdown -h now
> > respectively, unless conflicting options are given. Linux has a -f
> > option for what's currently reboot's and halt's default action, and
> > fastboot(8)/fasthalt(8) could also retain the current behaviour.

> > I would be in favour of this change.
> I'm not sure I'd go this far.  I really *LIKE* that halt/reboot is the 
> low-level interface that shutdown -r now calls.  I'm not sure that 
> moving away from this would be a good idea.  It cuts out many levels of 
> indirection that can be useful in many instances.

But that's not how it works. After printing all the warnings,
shutdown(8) signals init. Ctrl+Alt+Del also signals init (and that's
nontrivial to change, because it's in the kernel).

Only if the strange -o option is used does shutdown execute reboot(8) or
halt(8).

I think the canonical low-level interface should be sending signals to
init. reboot(8) and halt(8) doing things on their own should be banished
to non-default options. (Something should be fixed first so that
/etc/rc.d/mixer doesn't destroy the user's settings from single-user
mode.)

-- 
Jilles Tjoelker



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110101145734.GA72435>