Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 May 2012 15:03:35 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Doug Barton <dougb@freebsd.org>
Cc:        Jilles Tjoelker <jilles@stack.nl>, freebsd-arch@freebsd.org
Subject:   Re: [patch] halt/reboot/shutdown cleanup
Message-ID:  <E610146B-7AC8-4795-A364-B1D8EE77EB9C@bsdimp.com>
In-Reply-To: <4FB40506.3000300@FreeBSD.org>
References:  <20120513220646.GA12826@stack.nl> <CA766F13-E02E-4815-9AEE-984BC14F2CB9@bsdimp.com> <4FB0CF88.5010309@FreeBSD.org> <3D895644-0BA5-44F7-AC8F-07323729C1AA@bsdimp.com> <4FB40506.3000300@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

On May 16, 2012, at 1:50 PM, Doug Barton wrote:

> On 05/14/2012 07:36, Warner Losh wrote:
>>=20
>> On May 14, 2012, at 3:25 AM, Doug Barton wrote:
>>=20
>>> On 5/13/2012 3:42 PM, Warner Losh wrote:
>>>>=20
>>>> On May 13, 2012, at 4:06 PM, Jilles Tjoelker wrote:
>>>>> Also, the normal forms of halt and reboot will now call
>>>>> shutdown so users get a clear message of the event.
>>>>=20
>>>> I hate these messages, which is why I always use halt or reboot
>>>> to avoid them.
>>>=20
>>> You hate messages? Seriously?
>>=20
>> Seriously.  And I'd appreciate it if you didn't mock me on this.  It
>> is rude and insulting and not constructive to a dialog.
>=20
> Just to be clear, I wasn't mocking you. I recently did actually mock
> someone for something that seemed so totally impossible that I felt it
> was safe to mock, and it turned out I was wrong. So what I'm trying to
> get at is what your real concerns are.

Yea.  I'm having a colorful backstory in my life, so I'm a little more =
touchy than normal.  Sorry if I needlessly flew off the handle.

> If you seriously hate messages saying that things are shutting down
> properly, and that's a key issue for you objecting to the change that
> Jilles is proposing, we can look at ways to mitigate that. If what
> you're really saying is, "I want to do it the old way, no matter =
what,"
> that's a whole different issue.

Nah, I'm just expressing concern that existing users, as well as =
existing programs, expect things a certain way and to change things for =
no better than aesthetics is unwise.  In the course of the discussion, =
it's clear that there's more to it than that, and some accommodation is =
needed...

>>>> I find the additional delays from doing a shutdown -r to also be
>>>> annoying, which is why I never use them.
>>>=20
>>> If things are working as they should be, running rc.shutdown won't
>>> cause any delays at all vs. the brute force method used by
>>> 'shutdown'. The only time you'll see a delay is if something that's
>>> being killed actually needs it to cleanly shut down.
>>=20
>> halt and reboot are low level interfaces.  shutdown is the higher
>> level interface that people should use.
>=20
> The problem is that people see the names "halt" and "reboot" and =
assume
> that "simpler is better" and use them. The fact that the proper way to
> reboot a FreeBSD system is 'shutdown -r' is ... just silly.

Right, but this is the historical way things have been done, and there =
are many existing users who have products that depend on the difference. =
 So the argument for change needs to be stronger.

I think a more proper argument could be made that the times have changed =
and that while it would be desirable to retain the old interface, it is =
more desirable to file off the rough edges from the crufty old =
interfaces to improve the user experience for the hordes that are coming =
from the Linux world.

Of course, if all reboot is going to do is call shutdown -r now, then =
maybe it makes sense to just install a shell script called reboot and =
rename the current reboot to fastreboot.

>> See my other post for a way forward, sans bogusly scary names.
>=20
> I've read the other messages in the thread, and I'm glad to see we're
> converging on a way forward. I don't like the names fast{halt|reboot}
> because they still sound "better" than the proper solutions to an
> unsophisticated user. My first choice would be something like unsafe,
> but I'd settle for something like old as the prefix. Then we can make
> 'reboot' do what 'shutdown -r' does, and 'halt' equivalent to =
'shutdown
> -p'.

Well, a simple alias in root's .profile could do that :)  Sadly, that's =
not a sufficient solution for a number of reasons.

However, I think that we can get most of what is needed here by =
tightening up the shutdown -r path, and reinventing[*] fasthalt and =
fastreboot from SunOS 4.x days.  Then reboot/halt could easily be a =
simple shell script that invokes shutdown.  This would allow the =
embedded folks to replace it with fast*, while allowing the enterprise =
customers a more uniform experience with their linux and solaris =
systems.  And the tightening up would likely cause the developer =
community to not notice as much the difference, because the artificial =
delays have been removed.  Or to add to their .profile/.cshrc files =
something along the lines of alias reboot fastreboot.

Warner

[*] I say reinventing here because IIRC fastboot also suppressed the =
full fsck of filesystems when the system is coming back up.  with zfs, =
ufs + suj, the clean flag short-curcuit, etc that functionality is no =
longer all that useful.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E610146B-7AC8-4795-A364-B1D8EE77EB9C>