Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2011 21:24:30 -0600
From:      Adam Vande More <amvandemore@gmail.com>
To:        John Levine <johnl@iecc.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: shutdown computer after the halt command
Message-ID:  <AANLkTimiFUV9GdXOsgw6SJ2yjg0TSq+wjv80yL7oXDyG@mail.gmail.com>
In-Reply-To: <20110208025451.24154.qmail@joyce.lan>
References:  <AANLkTimXnCVBbZ1xz=jRMXGfg6Bka2vns_icg+06O9ZT@mail.gmail.com> <20110208025451.24154.qmail@joyce.lan>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Mon, Feb 7, 2011 at 8:54 PM, John Levine <johnl@iecc.com> 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.<http://jl.ly>;
>

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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?AANLkTimiFUV9GdXOsgw6SJ2yjg0TSq+wjv80yL7oXDyG>