From owner-svn-src-head@FreeBSD.ORG Fri Dec 31 22:42:53 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EBA5106564A for ; Fri, 31 Dec 2010 22:42:53 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 265948FC08 for ; Fri, 31 Dec 2010 22:42:52 +0000 (UTC) Received: from c83-255-61-120.bredband.comhem.se ([83.255.61.120]:55441 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.72) (envelope-from ) id 1PYnVD-0005So-60 for svn-src-head@freebsd.org; Fri, 31 Dec 2010 23:31:18 +0100 Received: (qmail 29699 invoked from network); 31 Dec 2010 23:31:14 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 31 Dec 2010 23:31:14 +0100 Received: (qmail 26547 invoked by uid 1001); 31 Dec 2010 23:31:14 +0100 Date: Fri, 31 Dec 2010 23:31:14 +0100 From: Erik Trulsson To: Alexander Best Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101231190058.GA79467@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: 83.255.61.120 X-Scan-Result: No virus found in message 1PYnVD-0005So-60. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1PYnVD-0005So-60 b74439c8d457657f9c72cdae098d2a54 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Pawel Jakub Dawidek , Jilles Tjoelker Subject: Re: svn commit: r216823 - head/sbin/shutdown X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2010 22:42:53 -0000 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.) -- Erik Trulsson ertr1013@student.uu.se