fp on feebsd
Bill Vermillion
fp at wjv.com
Tue Sep 14 18:15:18 PDT 2004
As Jerry Sloan was scratching "For a good prime call
391581 * 2^216193 -1" on the wall, he suddenly said:
> Walter Vaughan wrote:
> >Enrique Arredondo wrote:
> >>How do you normally shutdown FREEBSD ? I tried "shutdown -g0 -y" but
> >>didn't like it. So I pressed CTRL-ALT-DEL and it did the forced
> >>shutdown automatically.
> >Yeah the 5.X and newer (I built FreeBSD-6 last night, so I understand
> >your quest for the unknown side of things) really tries to be more
> >mainstream in operation. The boot loader has an option that's very
> >MS-Windows like with "Safe Mode" and intercepting the three finger
> >salute.
> >Get the 4.10 minimal ISO and burn a copy of that. It'll install in
> >about 10 minutes. That version feels very much like the SCO you're
> >used to.
> >I've only really used "reboot"
> >%man reboot
> >REBOOT(8) FreeBSD System Manager's Manual
> >NAME
> > reboot, halt, fastboot, fasthalt -- stopping and restarting the
> >system
> >SYNOPSIS
> > halt [-lnqp] [-k kernel]
> > reboot [-dlnqp] [-k kernel]
> > fasthalt [-lnqp] [-k kernel]
> > fastboot [-dlnqp] [-k kernel]
> >DESCRIPTION
> >The halt and reboot utilities flush the file system cache to disk,
> >send all running processes a SIGTERM (and subsequently a SIGKILL) and,
> >respec
> >tively, halt or restart the system. The action is logged, including
> >entering a shutdown record into the wtmp(5) file.
> >[...]
> The command to reboot FreeBSD is this shutdown -r now to reboot, and
> shutdown -h to halt and shutdown
And reboot works well too.
I'll suck to this message the output of ls -lai `whence halt`
and follow that with reboot, fasthalt and fastboot.
1900 -r-xr-xr-x 4 root wheel 229352 Jun 10 22:28 /sbin/halt
1900 -r-xr-xr-x 4 root wheel 229352 Jun 10 22:28 /sbin/reboot
1900 -r-xr-xr-x 4 root wheel 229352 Jun 10 22:28 /sbin/fasthalt
1900 -r-xr-xr-x 4 root wheel 229352 Jun 10 22:28 /sbin/fastboot
As you can see all four are hardlinks to the same inode - number
1900.
And an excerpt from the shutdown man page:
========================================
SYNOPSIS
shutdown [-] [-h | -p | -r | -k] [-o [-n]] time [warning-message ...]
... [deletia]
-o If one of the -h, -p or -r is specified, shutdown will execute
halt(8) or reboot(8) instead of sending signal to init(8).
-n If the -o is specified, prevent the file system cache from being
flushed by passing -n option to halt(8) or reboot(8). This
option should probably not be used.
========================================
So when you run shutdown -r you call reboot, and shutdown -h calls
halt. Shutdown can almost be thought of a wrapper for the above
command as it will delay them to the time specified if specified
in hh:mm format or in x minutes when given as +x
If you run 'strings' on /sbin/shutdown you will find /sbin/halt
and /sbin/reboot in the program.
So either method is fine if you just want a simple shutdown or
reboot.
Bill
--
Bill Vermillion - bv @ wjv . com
More information about the Filepro-list
mailing list