From owner-freebsd-questions@FreeBSD.ORG Tue Feb 8 03:24:34 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71804106566B for ; Tue, 8 Feb 2011 03:24:34 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 04C138FC17 for ; Tue, 8 Feb 2011 03:24:33 +0000 (UTC) Received: by fxm16 with SMTP id 16so5877263fxm.13 for ; Mon, 07 Feb 2011 19:24:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=w7a3UNwp+tSqCjMU9UpsvdJJOrTbloFRxMup58Z0Wzk=; b=UwNsqX+A8hCb4nD4e4u7viO8ny5QhdLBRoRsg3Tt9Jr4wniGeKL6PGZ6YYbGdircqc VNwnEpsgER49KeDbrevzcW9txi3pXyauejyF/NU8esT14FvF2Hheiey4v841/QnL5Cb8 6FqSWbMnOuwLReLpCnI2EWtA3QvbvHeZNWvcw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=wXF2TeBJ+ZaU06emc6obtCMBUXAyWoBvCr66TtCCUv/2N/2zvfbF+pI+A0pc2Q5NpL v+aZenKVkWF4HIgiBRmgK8IndGH0PbVRUDF1gNFoMiQhjh4diKtgSEeHy2Qn4Ag2H1O5 p2S9T13lAxEHVe53lH0kNwvOLW1RoYcQ18HfY= MIME-Version: 1.0 Received: by 10.223.106.129 with SMTP id x1mr893004fao.13.1297135471011; Mon, 07 Feb 2011 19:24:31 -0800 (PST) Received: by 10.223.114.4 with HTTP; Mon, 7 Feb 2011 19:24:30 -0800 (PST) In-Reply-To: <20110208025451.24154.qmail@joyce.lan> References: <20110208025451.24154.qmail@joyce.lan> Date: Mon, 7 Feb 2011 21:24:30 -0600 Message-ID: From: Adam Vande More To: John Levine Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-questions@freebsd.org Subject: Re: shutdown computer after the halt command X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2011 03:24:34 -0000 On Mon, Feb 7, 2011 at 8:54 PM, John Levine wrote: > >I used to believe that until I was shown I was wrong. The easiest way to > >see you're wrong is to drop to ttyv0 then do one of each like a reboot > then > >a shutdown -r now. In the latter case, you'll notice /etc/rc.d/ and > >/usr/local/etc/rc.d/ stop scripts being processed but not so in the > former. > > Uh, no. shutdown or halt signals init, and init runs /etc/rc.shutdown > which runs all the shutdown scripts. The only extra work that > shutdown does is to blat lots of warnings onto the ttys. > > Read the man pages for shutdown, halt, and init if you believe otherwise. > Yes please do so as that's not what it says at all although I think could certainly be a worded better. It's quite easy to see you're wrong, just follow the steps I outlined above. If you are correct, reboot(8) should print things like: Stopping sshd. to the console. It doesn't and shutdown(8) does so the proof is right there. The reboot man page only hints at it though unfortunately which caused my initial confusion(in addition to the permissions mismatch between the two). Normally, the shutdown(8) utility is used when the system needs to be halted or restarted, giving users advance warning of their impending doom and cleanly terminating specific programs. You can also reference init.c if you still think you're correct. In addition, please read carefully through this thread and then examine your arguments vs what is reality and then we can all be on the same page. http://lists.freebsd.org/pipermail/freebsd-stable/2010-December/060519.html -- Adam Vande More