[6370fa6] | 1 | <sect2>
|
---|
| 2 | <title>Contents</title>
|
---|
| 3 |
|
---|
[53ad30a] | 4 | <para>The Sysvinit package contains the halt, init, killall5, last,
|
---|
| 5 | lastb, mesg, pidof, poweroff, reboot, runlevel, shutdown, sulogin,
|
---|
| 6 | telinit, utmpdump, wall,</para>
|
---|
[6370fa6] | 7 |
|
---|
| 8 | </sect2>
|
---|
| 9 |
|
---|
| 10 | <sect2><title>Description</title>
|
---|
| 11 |
|
---|
| 12 | <sect3><title>halt</title>
|
---|
[b822811] | 13 | <para>Halt notes that the system is being brought down in the file
|
---|
[6370fa6] | 14 | /var/log/wtmp, and then either tells the kernel to halt, reboot or
|
---|
| 15 | poweroff the system. If halt or reboot is called when the system is not
|
---|
[b822811] | 16 | in runlevel 0 or 6, shutdown will be invoked instead (with
|
---|
[53ad30a] | 17 | the flag -h or -r).</para></sect3>
|
---|
[6370fa6] | 18 |
|
---|
| 19 | <sect3><title>init</title>
|
---|
[b822811] | 20 | <para>Init is the parent of all processes. Its primary role is to create
|
---|
[6370fa6] | 21 | processes from a script stored in the file /etc/inittab. This
|
---|
| 22 | file usually has entries which cause init to spawn gettys on each line that
|
---|
| 23 | users can log in. It also controls autonomous processes required by any
|
---|
[53ad30a] | 24 | particular system.</para></sect3>
|
---|
[6370fa6] | 25 |
|
---|
| 26 | <sect3><title>killall5</title>
|
---|
[b822811] | 27 | <para>killall5 is the SystemV killall command. It sends a signal to all
|
---|
[6370fa6] | 28 | processes except the processes in its own session, so it won't kill the
|
---|
[53ad30a] | 29 | shell that is running the script it was called from.</para></sect3>
|
---|
[6370fa6] | 30 |
|
---|
| 31 |
|
---|
[53ad30a] | 32 | <sect3><title>last</title>
|
---|
| 33 | <para>last searches back through the file /var/log/wtmp (or the file designated
|
---|
| 34 | by the -f flag) and displays a list of all users logged in (and out)
|
---|
| 35 | since that file was created.</para></sect3>
|
---|
[6370fa6] | 36 |
|
---|
[53ad30a] | 37 | <sect3><title>lastb</title>
|
---|
| 38 | <para>lastb is the same as last, except that by default it shows a log of the
|
---|
| 39 | file /var/log/btmp, which contains all the bad login attempts.</para></sect3>
|
---|
[6370fa6] | 40 |
|
---|
[53ad30a] | 41 | <sect3><title>mesg</title>
|
---|
| 42 | <para>Mesg controls the access to the users terminal by others. It's typically
|
---|
| 43 | used to allow or disallow other users to write to his terminal.</para></sect3>
|
---|
[6370fa6] | 44 |
|
---|
[53ad30a] | 45 | <sect3><title>pidof</title>
|
---|
| 46 | <para>Pidof finds the process id's (pids) of the named programs and prints
|
---|
| 47 | those id's on standard output.</para></sect3>
|
---|
[6370fa6] | 48 |
|
---|
[53ad30a] | 49 | <sect3><title>poweroff</title>
|
---|
| 50 | <para>poweroff is equivalent to shutdown -h -p now. It halts the computer and
|
---|
| 51 | switches off the computer (when using an APM compliant BIOS and APM is
|
---|
| 52 | enabled in the kernel).</para></sect3>
|
---|
[6370fa6] | 53 |
|
---|
[53ad30a] | 54 | <sect3><title>reboot</title>
|
---|
| 55 | <para>reboot is equivalent to shutdown -r now. It reboots
|
---|
| 56 | the computer.</para></sect3>
|
---|
[6370fa6] | 57 |
|
---|
| 58 | <sect3><title>runlevel</title>
|
---|
[b822811] | 59 | <para>Runlevel reads the system utmp file (typically /var/run/utmp) to locate
|
---|
[6370fa6] | 60 | the runlevel record, and then prints the previous and current system
|
---|
[53ad30a] | 61 | runlevel on its standard output, separated by a single space.</para></sect3>
|
---|
[6370fa6] | 62 |
|
---|
| 63 | <sect3><title>shutdown</title>
|
---|
[b822811] | 64 | <para>shutdown brings the system down in a secure way. All logged-in users are
|
---|
[53ad30a] | 65 | notified that the system is going down, and login is blocked.</para></sect3>
|
---|
[6370fa6] | 66 |
|
---|
| 67 | <sect3><title>sulogin</title>
|
---|
[b822811] | 68 | <para>sulogin is invoked by init when the system goes into single user mode
|
---|
[6370fa6] | 69 | (this is done through an entry in /etc/inittab). Init also tries to
|
---|
[b822811] | 70 | execute sulogin when it is passed the -b flag from the boot loader
|
---|
[53ad30a] | 71 | (eg, LILO).</para></sect3>
|
---|
[6370fa6] | 72 |
|
---|
| 73 | <sect3><title>telinit</title>
|
---|
[b822811] | 74 | <para>telinit sends appropriate signals to init, telling it which runlevel to
|
---|
[53ad30a] | 75 | change to.</para></sect3>
|
---|
| 76 |
|
---|
| 77 | <sect3><title>utmpdump</title>
|
---|
| 78 | <para>utmpdumps prints the content of a file (usually /var/run/utmp) on
|
---|
| 79 | standard output in a user friendly format.</para></sect3>
|
---|
[6370fa6] | 80 |
|
---|
[53ad30a] | 81 | <sect3><title>wall</title>
|
---|
| 82 | <para>Wall sends a message to everybody logged in with their mesg permission
|
---|
| 83 | set to yes.</para></sect3>
|
---|
[6370fa6] | 84 |
|
---|
| 85 | </sect2>
|
---|
| 86 |
|
---|