Addition to reboot(8): reboot / halt reasons
Wes Peters
wes at softweyr.com
Tue Sep 2 14:05:42 PDT 2003
On Tuesday 02 September 2003 06:40, Daniel Lang wrote:
> Hi,
>
> Christopher Nehren wrote on Tue, Sep 02, 2003 at 08:55:23AM -0400:
> > On Tue, 2003-09-02 at 00:36, Sean Kelly wrote:
> > > Err.. Wouldn't it just be easier to use the `shutdown` command?
> > > I suggest you check `man 8 shutdown` out.
> >
> > I'll concede and admit that I should have RTFM'd. But in the same
> > vein, if shutdown(8) provides the functionality of halt(8) and
> > reboot(8), why do they exist as separate programs? I'm probably
> > missing something here, but wouldn't it be easier to just combine
> > shutdown and reboot / halt, as reboot and halt already are?
>
> Yes, you are missing something.
>
> shutdown(8) is a sort-of frontend to reboot/halt. It contains
> additional functionality and calls /sbin/halt or /sbin/reboot.
> So the combination already exists. Further halt(8) and
> reboot(8) are the same program, as you can easily verify using
> ls -i.
>
> The shutdown(8) frontend adds warning-messages and grace-time
> features to reboot/halt.
The true answer is "hysterical raisins." Or was that "historical
reasons?" Something like that.
reboot and halt are BSD commands, shutdown SYSV-ish. Shutdown has all
those nice "professional" options to warn users, schedule a shutdown in
a few minutes, etc. Reboot and halt expect you to already know how to
use at(1) and wall(1) to effect the same results, and to write a script
if you really want to do that over and over again.
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters wes at softweyr.com
More information about the freebsd-hackers
mailing list