Date: Wed, 16 May 2012 22:28:41 -0700 From: Doug Barton <dougb@FreeBSD.org> To: Warner Losh <imp@bsdimp.com> Cc: Jilles Tjoelker <jilles@stack.nl>, freebsd-arch@freebsd.org Subject: Re: [patch] halt/reboot/shutdown cleanup Message-ID: <4FB48C89.9010703@FreeBSD.org> In-Reply-To: <E610146B-7AC8-4795-A364-B1D8EE77EB9C@bsdimp.com> 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> <E610146B-7AC8-4795-A364-B1D8EE77EB9C@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05/16/2012 14:03, Warner Losh wrote: > > On May 16, 2012, at 1:50 PM, Doug Barton wrote: > >> On 05/14/2012 07:36, Warner Losh wrote: >>> >>> On May 14, 2012, at 3:25 AM, Doug Barton wrote: >>> >>>> On 5/13/2012 3:42 PM, Warner Losh wrote: >>>>> >>>>> 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. >>>>> >>>>> I hate these messages, which is why I always use halt or >>>>> reboot to avoid them. >>>> >>>> You hate messages? Seriously? >>> >>> 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. >> >> 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. No problem. The pop culture version of "seriously?" is not what I intended, but I can certainly see how you could have taken it that way. >> 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'm glad that we're converging on something useful. >>>>> I find the additional delays from doing a shutdown -r to also >>>>> be annoying, which is why I never use them. >>>> >>>> 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. >>> >>> halt and reboot are low level interfaces. shutdown is the >>> higher level interface that people should use. >> >> 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. Honestly, people coming over from Linux is on my RADAR. We're in a situation now where the vast majority of our new users are going to be coming from that world because they start their exposure to Unix with a Linux desktop. I'm *not* saying that we need to gratuitously do things the Linux way, but I am saying that we need to think more carefully about being user friendly in a world where most of our users are not historical BSD'ers. > 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. At various times in the past I've proposed this exact solution. To be honest I haven't analyzed Jilles' patches in detail because I didn't want to wast time if there was no way they would go in. I'll give them another look now. >>> See my other post for a way forward, sans bogusly scary names. >> >> 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. I don't like the alias route as the default solution because it's too easily circumvented, which would lead to even more user confusion. I dig the SunOS vibe you're layin' down on the good old fast* versions, but I remain concerned that by using those names we would create an even brighter flame that will attract more people than just 'halt' and 'reboot' do now. And yes, I think it's more than just aesthetics. The things that 'shutdown -*' do are things that almost all of our users actually need done. For example, I've worked pretty hard to get the shutdown KEYWORD into all of the relevant rc.d scripts in order to make sure that when rc.shutdown is run things get shut down cleanly. This has significantly reduced the number of complaints about things that have interrelated dependencies corrupting each other. Almost all of these complaints nowadays are due to someone typing 'halt' or 'reboot', and mostly in ports (where the relationships can be both more numerous and more complex). I'm have never said that the old tools should be removed, just that they should be renamed. I understand that there is a non-zero cost to this for users who will have to retool scripts and such that use the old names, *and actually need* the old behavior. But I'm confident that the net benefit of having 'halt' and 'reboot' do the right thing by default will more than make up for it. Doug > 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. -- This .signature sanitized for your protection
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FB48C89.9010703>