Date: Fri, 31 Dec 2010 23:39:24 +0000 From: Alexander Best <arundel@freebsd.org> To: Erik Trulsson <ertr1013@student.uu.se> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek <pjd@FreeBSD.org>, Jilles Tjoelker <jilles@stack.nl> Subject: Re: svn commit: r216823 - head/sbin/shutdown Message-ID: <20101231233924.GA12978@freebsd.org> In-Reply-To: <20101231223114.GA26424@owl.midgard.homeip.net> References: <201012301806.oBUI6VcW046731@svn.freebsd.org> <20101231144308.GA55052@stack.nl> <20101231165552.GA24854@owl.midgard.homeip.net> <20101231190058.GA79467@freebsd.org> <20101231223114.GA26424@owl.midgard.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri Dec 31 10, Erik Trulsson wrote: > On Fri, Dec 31, 2010 at 07:00:58PM +0000, Alexander Best wrote: > > [snip] > > > another thought: running 'reboot' instead of 'shutdown -r now' *can* cause > > harm to the system, because an important rc.shutdown script wasn't executed. > > however running 'shutdown -r now' in single-user mode e.g. will cause a few > > sterr warnings; however it *cannot* cause any harm. > > Oh, yes, it can! (And I have been burnt by it once, after which I got > very careful about not using 'shutdown -r now' from single user mode.) > > Take a look at /etc/rc.d/mixer > At shutdown it saves the current state of the soundcard mixer values > into a file and at start it restores the mixer values from that file. > If you boot into single user mode the start function will of course not > be executed leaving the mixer values at their default values. If you > then use 'shutdown' these default values are what will be saved, > overwriting whatever values had been saved before, while if you had > instead had used 'reboot' the old saved values would have been left > untouched. > If you never change the mixer values from their defaukt you won't notice > anything, but otherwise it might take a while to figure out why the > sound is at the 'wrong' volume. > > This is one example I have found where bad things can happen if you use > 'shutdown' when you should have used 'reboot'. I am fairly sure that > there are other instances that I just haven't run into (yet.) that's a very good argument and in fact i remember to have also once been bitten by the 'mixer' case. so after a some more thoughts: just leave it the way it is. it would be nice to have two commands which would do 'shutdown -r now' and 'shutdown -h now', but i can't think of a name: slowboot/slowhalt? ;) cheers. alex > > > > > -- > <Insert your favourite quote here.> > Erik Trulsson > ertr1013@student.uu.se -- a13x
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101231233924.GA12978>