Drop hurd specific dependency on libc0.3 (>= 2.3.2.ds1-12). It is
no longer needed according to Michael Bunk. Patch from Michael Biebl.
This commit is contained in:
72
man/bootlogd.8
Normal file
72
man/bootlogd.8
Normal file
@@ -0,0 +1,72 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2003 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH BOOTLOGD 8 "Jul 21, 2003" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
bootlogd \- record boot messages
|
||||
.SH SYNOPSIS
|
||||
.B /sbin/bootlogd
|
||||
.RB [ \-c ]
|
||||
.RB [ \-d ]
|
||||
.RB [ \-r ]
|
||||
.RB [ \-s ]
|
||||
.RB [ \-v ]
|
||||
.RB [ " -l logfile " ]
|
||||
.RB [ " -p pidfile " ]
|
||||
.SH DESCRIPTION
|
||||
\fBBootlogd\fP runs in the background and copies all strings sent to the
|
||||
\fI/dev/console\fP device to a logfile. If the logfile is not accessible,
|
||||
the messages will be kept in memory until it is.
|
||||
.SH OPTIONS
|
||||
.IP \fB\-d\fP
|
||||
Do not fork and run in the background.
|
||||
.IP \fB\-c\fP
|
||||
Attempt to write to the logfile even if it does not yet exist.
|
||||
Without this option,
|
||||
.B bootlogd
|
||||
will wait for the logfile to appear before attempting to write to it.
|
||||
This behavior prevents bootlogd from creating logfiles under mount points.
|
||||
.IP \fB\-r\fP
|
||||
If there is an existing logfile called \fIlogfile\fP rename it to
|
||||
\fIlogfile~\fP unless \fIlogfile~\fP already exists.
|
||||
.IP \fB\-s\fP
|
||||
Ensure that the data is written to the file after each line by calling
|
||||
.BR fdatasync (3).
|
||||
This will slow down a
|
||||
.BR fsck (8)
|
||||
process running in parallel.
|
||||
.IP \fB\-v\fP
|
||||
Show version.
|
||||
.IP "\fB\-l\fP \fIlogfile\fP"
|
||||
Log to this logfile. The default is \fI/var/log/boot\fP.
|
||||
.IP "\fB\-p\fP \fIpidfile\fP"
|
||||
Put process-id in this file. The default is no pidfile.
|
||||
.SH BUGS
|
||||
Bootlogd works by redirecting the console output from the console device.
|
||||
(Consequently \fBbootlogd\fP requires PTY support in the kernel configuration.)
|
||||
It copies that output to the real console device and to a log file.
|
||||
There is no standard way of ascertaining the real console device
|
||||
if you have a new-style \fI/dev/console\fP device (major 5, minor 1)
|
||||
so \fBbootlogd\fP parses the kernel command line looking for
|
||||
\fBconsole=...\fP lines and deduces the real console device from that.
|
||||
If that syntax is ever changed by the kernel, or a console type is used that
|
||||
\fBbootlogd\fP does not know about then \fBbootlogd\fP will not work.
|
||||
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.SH "SEE ALSO"
|
||||
.BR dmesg (8), fdatasync (3).
|
52
man/bootlogd.8.todo
Normal file
52
man/bootlogd.8.todo
Normal file
@@ -0,0 +1,52 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-1999 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH BOOTLOGD 8 "Aug 24, 1999" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
bootlogd \- record boot messages
|
||||
.SH SYNOPSIS
|
||||
.B /sbin/bootlogd
|
||||
.RB [ \-d ]
|
||||
.RB [ \-r ]
|
||||
.RB [ \-v ]
|
||||
.RB [ " -l logfile " ]
|
||||
.RB [ " -p pidfile " ]
|
||||
.SH DESCRIPTION
|
||||
\fBBootlogd\fP runs in the background and copies all strings sent to the
|
||||
\fI/dev/console\fP device to a logfile. If the logfile is not accessible,
|
||||
the messages will be buffered in-memory until it is.
|
||||
.SH OPTIONS
|
||||
.IP \fB\-d\fP
|
||||
Do not fork and run in the background.
|
||||
.IP \fB\-r\fP
|
||||
If there is an existing logfile called \fIlogfile\fP rename it to
|
||||
\fIlogfile~\fP unless \fIlogfile~\fP already exists.
|
||||
.IP \fB\-v\fP
|
||||
Show version.
|
||||
.IP \fB\-l logfile\fP
|
||||
Log to this logfile. The default is \fI/var/log/boot.log\fP.
|
||||
.IP \fB\-p pidfile\fP
|
||||
Put process-id in this file. The default is no pidfile.
|
||||
.SH NOTES
|
||||
There is no standard way to find out the real console device if you have
|
||||
a new-style \fI/dev/console\fP device (major 5, minor 1). \fBBootlogd\fP
|
||||
might have some difficulties to do this, especially under very old
|
||||
or very new kernels.
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.SH "SEE ALSO"
|
||||
.BR dmesg (8)
|
120
man/halt.8
Normal file
120
man/halt.8
Normal file
@@ -0,0 +1,120 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2001 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH HALT 8 "Nov 6, 2001" "" "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
halt, reboot, poweroff \- stop the system.
|
||||
.\"}}}
|
||||
.\"{{{ Synopsis
|
||||
.SH SYNOPSIS
|
||||
.B /sbin/halt
|
||||
.RB [ \-n ]
|
||||
.RB [ \-w ]
|
||||
.RB [ \-d ]
|
||||
.RB [ \-f ]
|
||||
.RB [ \-i ]
|
||||
.RB [ \-p ]
|
||||
.RB [ \-h ]
|
||||
.br
|
||||
.B /sbin/reboot
|
||||
.RB [ \-n ]
|
||||
.RB [ \-w ]
|
||||
.RB [ \-d ]
|
||||
.RB [ \-f ]
|
||||
.RB [ \-i ]
|
||||
.br
|
||||
.B /sbin/poweroff
|
||||
.RB [ \-n ]
|
||||
.RB [ \-w ]
|
||||
.RB [ \-d ]
|
||||
.RB [ \-f ]
|
||||
.RB [ \-i ]
|
||||
.RB [ \-h ]
|
||||
.\"}}}
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
\fBHalt\fP notes that the system is being brought down in the file
|
||||
\fI/var/log/wtmp\fP, and then either tells the kernel to halt, reboot or
|
||||
power-off the system.
|
||||
.PP
|
||||
If \fBhalt\fP or \fBreboot\fP is called when the system is
|
||||
\fInot\fP in runlevel \fB0\fP or \fB6\fP, in other words when it's running
|
||||
normally, \fBshutdown\fP will be invoked instead (with the \fB-h\fP
|
||||
or \fB-r\fP flag). For more info see the \fBshutdown\fP(8)
|
||||
manpage.
|
||||
.PP
|
||||
The rest of this manpage describes the behaviour in runlevels 0
|
||||
and 6, that is when the systems shutdown scripts are being run.
|
||||
.\"}}}
|
||||
.\"{{{ Options
|
||||
.SH OPTIONS
|
||||
.IP \fB\-n\fP
|
||||
Don't sync before reboot or halt. Note that the kernel and storage
|
||||
drivers may still sync.
|
||||
.IP \fB\-w\fP
|
||||
Don't actually reboot or halt but only write the wtmp record
|
||||
(in the \fI/var/log/wtmp\fP file).
|
||||
.IP \fB\-d\fP
|
||||
Don't write the wtmp record. The \fB\-n\fP flag implies \fB\-d\fP.
|
||||
.IP \fB\-f\fP
|
||||
Force halt or reboot, don't call \fBshutdown\fP(8).
|
||||
.IP \fB\-i\fP
|
||||
Shut down all network interfaces just before halt or reboot.
|
||||
.IP \fB\-h\fP
|
||||
Put all hard drives on the system in stand-by mode just before halt or power-off.
|
||||
.IP \fB\-p\fP
|
||||
When halting the system, switch off the power. This is the default when halt is
|
||||
called as \fBpoweroff\fP.
|
||||
.\"}}}
|
||||
.\"{{{ Diagnostics
|
||||
.SH DIAGNOSTICS
|
||||
If you're not the superuser, you will get the message `must be superuser'.
|
||||
.\"}}}
|
||||
.\"{{{ Notes
|
||||
.SH NOTES
|
||||
Under older \fBsysvinit\fP releases , \fBreboot\fP and \fBhalt\fP should
|
||||
never be called directly. From release 2.74 on \fBhalt\fP and \fBreboot\fP
|
||||
invoke \fBshutdown\fP(8) if the system is not in runlevel 0 or 6. This
|
||||
means that if \fBhalt\fP or \fBreboot\fP cannot find out the current
|
||||
runlevel (for example, when \fI/var/run/utmp\fP hasn't been initialized
|
||||
correctly) \fBshutdown\fP will be called, which might not be what you want.
|
||||
Use the \fB-f\fP flag if you want to do a hard \fBhalt\fP or \fBreboot\fP.
|
||||
.PP
|
||||
The \fB-h\fP flag puts all hard disks in standby mode just before halt
|
||||
or power-off. Right now this is only implemented for IDE drives. A side
|
||||
effect of putting the drive in stand-by mode is that the write cache
|
||||
on the disk is flushed. This is important for IDE drives, since the
|
||||
kernel doesn't flush the write cache itself before power-off.
|
||||
.PP
|
||||
The \fBhalt\fP program uses /proc/ide/hd* to find all IDE disk devices,
|
||||
which means that \fI/proc\fP needs to be mounted when \fBhalt\fP or
|
||||
\fBpoweroff\fP is called or the \fB-h\fP switch will do nothing.
|
||||
.PP
|
||||
.\"}}}
|
||||
.\"{{{ Author
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
.BR shutdown (8),
|
||||
.BR init (8)
|
||||
.\"}}}
|
313
man/init.8
Normal file
313
man/init.8
Normal file
@@ -0,0 +1,313 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2004 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH INIT 8 "29 Jul 2004" "" "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
init, telinit \- process control initialization
|
||||
.\"}}}
|
||||
.\"{{{ Synopsis
|
||||
.SH SYNOPSIS
|
||||
.B /sbin/init
|
||||
.RB [ " -a " ]
|
||||
.RB [ " -s " ]
|
||||
.RB [ " -b " ]
|
||||
[ \fB\-z\fP \fIxxx\fP ]
|
||||
.RB [ " 0123456Ss " ]
|
||||
.br
|
||||
.B /sbin/telinit
|
||||
[ \fB\-t\fP \fISECONDS\fP ]
|
||||
.RB [ " 0123456sSQqabcUu " ]
|
||||
.br
|
||||
.B /sbin/telinit
|
||||
[ \fB\-e\fP \fIVAR\fP[\fB=\fP\fIVAL\fP] ]
|
||||
.\"}}}
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
.\"{{{ init
|
||||
.SS Init
|
||||
.B Init
|
||||
is the parent of all processes. Its primary role is to create processes
|
||||
from a script stored in the file \fB/etc/inittab\fP (see
|
||||
\fIinittab\fP(5)). This file usually has entries which cause \fBinit\fP
|
||||
to spawn \fBgetty\fPs on each line that users can log in. It also
|
||||
controls autonomous processes required by any particular system.
|
||||
.PP
|
||||
.\"{{{ Runlevels
|
||||
.SH RUNLEVELS
|
||||
A \fIrunlevel\fP is a software configuration of the system which allows
|
||||
only a selected group of processes to exist. The processes spawned by
|
||||
\fBinit\fP for each of these runlevels are defined in the
|
||||
\fB/etc/inittab\fP file. \fBInit\fP can be in one of eight runlevels:
|
||||
\fB0\(en6\fP and \fBS\fP or \fBs\fP. The runlevel is
|
||||
changed by having a privileged user run \fBtelinit\fP, which sends
|
||||
appropriate signals to \fBinit\fP, telling it which runlevel to change
|
||||
to.
|
||||
.PP
|
||||
Runlevels \fB0\fP, \fB1\fP, and \fB6\fP are reserved. Runlevel 0 is used to
|
||||
halt the system, runlevel 6 is used to reboot the system, and runlevel
|
||||
1 is used to get the system down into single user mode. Runlevel \fBS\fP
|
||||
is not really meant to be used directly, but more for the scripts that are
|
||||
executed when entering runlevel 1. For more information on this,
|
||||
see the manpages for \fBshutdown\fP(8) and \fBinittab\fP(5).
|
||||
.PP
|
||||
Runlevels 7-9 are also valid, though not really documented. This is
|
||||
because "traditional" Unix variants don't use them.
|
||||
In case you're curious, runlevels \fIS\fP and \fIs\fP are in fact the same.
|
||||
Internally they are aliases for the same runlevel.
|
||||
.\"}}}
|
||||
.PP
|
||||
.SH BOOTING
|
||||
After \fBinit\fP is invoked as the last step of the kernel boot sequence,
|
||||
it looks for the file \fB/etc/inittab\fP to see if there is an entry of the
|
||||
type \fBinitdefault\fP (see \fIinittab\fP(5)). The \fBinitdefault\fP entry
|
||||
determines the initial runlevel of the system. If there is no such
|
||||
entry (or no \fB/etc/inittab\fP at all), a runlevel must be
|
||||
entered at the system console.
|
||||
.PP
|
||||
Runlevel \fBS\fP or \fBs\fP bring the system to single user mode
|
||||
and do not require an \fB/etc/inittab\fP file. In single user mode,
|
||||
\fB/sbin/sulogin\fP is invoked on \fB/dev/console\fP.
|
||||
.PP
|
||||
When entering single user mode, \fBinit\fP initializes the consoles
|
||||
\fBstty\fP settings to sane values. Clocal mode is set. Hardware
|
||||
speed and handshaking are not changed.
|
||||
.PP
|
||||
When entering a multi-user mode for the first time, \fBinit\fP performs the
|
||||
\fBboot\fP and \fBbootwait\fP entries to allow file systems to be
|
||||
mounted before users can log in. Then all entries matching the runlevel
|
||||
are processed.
|
||||
.PP
|
||||
When starting a new process, \fBinit\fP first checks whether the file
|
||||
\fI/etc/initscript\fP exists. If it does, it uses this script to
|
||||
start the process.
|
||||
.PP
|
||||
Each time a child terminates, \fBinit\fP records the fact and the reason
|
||||
it died in \fB/var/run/utmp\fP and \fB/var/log/wtmp\fP,
|
||||
provided that these files exist.
|
||||
.SH CHANGING RUNLEVELS
|
||||
After it has spawned all of the processes specified, \fBinit\fP waits
|
||||
for one of its descendant processes to die, a powerfail signal, or until
|
||||
it is signaled by \fBtelinit\fP to change the system's runlevel.
|
||||
When one of the above three conditions occurs, it re-examines
|
||||
the \fB/etc/inittab\fP file. New entries can be added to this file at
|
||||
any time. However, \fBinit\fP still waits for one of the above three
|
||||
conditions to occur. To provide for an instantaneous response, the
|
||||
\fBtelinit Q\fP or \fBq\fP command can wake up \fBinit\fP to re-examine the
|
||||
\fB/etc/inittab\fP file.
|
||||
.PP
|
||||
If \fBinit\fP is not in single user mode and receives a powerfail
|
||||
signal (SIGPWR), it reads the file \fB/etc/powerstatus\fP. It then starts
|
||||
a command based on the contents of this file:
|
||||
.IP F(AIL)
|
||||
Power is failing, UPS is providing the power. Execute the \fBpowerwait\fP
|
||||
and \fBpowerfail\fP entries.
|
||||
.IP O(K)
|
||||
The power has been restored, execute the \fBpowerokwait\fP entries.
|
||||
.IP L(OW)
|
||||
The power is failing and the UPS has a low battery. Execute the
|
||||
\fBpowerfailnow\fP entries.
|
||||
.PP
|
||||
If /etc/powerstatus doesn't exist or contains anything else then the
|
||||
letters \fBF\fP, \fBO\fP or \fBL\fP, init will behave as if it has read
|
||||
the letter \fBF\fP.
|
||||
.PP
|
||||
Usage of \fBSIGPWR\fP and \fB/etc/powerstatus\fP is discouraged. Someone
|
||||
wanting to interact with \fBinit\fP should use the \fB/dev/initctl\fP
|
||||
control channel - see the source code of the \fBsysvinit\fP package
|
||||
for more documentation about this.
|
||||
.PP
|
||||
When \fBinit\fP is requested to change the runlevel, it sends the
|
||||
warning signal \s-1\fBSIGTERM\fP\s0 to all processes that are undefined
|
||||
in the new runlevel. It then waits 5 seconds before forcibly
|
||||
terminating these processes via the \s-1\fBSIGKILL\fP\s0 signal.
|
||||
Note that \fBinit\fP assumes that all these processes (and their
|
||||
descendants) remain in the same process group which \fBinit\fP
|
||||
originally created for them. If any process changes its process group
|
||||
affiliation it will not receive these signals. Such processes need to
|
||||
be terminated separately.
|
||||
.\"}}}
|
||||
.\"{{{ telinit
|
||||
.SH TELINIT
|
||||
\fB/sbin/telinit\fP is linked to \fB/sbin/init\fP. It takes a
|
||||
one-character argument and signals \fBinit\fP to perform the appropriate
|
||||
action. The following arguments serve as directives to
|
||||
\fBtelinit\fP:
|
||||
.IP "\fB0\fP,\fB1\fP,\fB2\fP,\fB3\fP,\fB4\fP,\fB5\fP or \fB6\fP"
|
||||
tell \fBinit\fP to switch to the specified run level.
|
||||
.IP \fBa\fP,\fBb\fP,\fBc\fP
|
||||
tell \fBinit\fP to process only those \fB/etc/inittab\fP file
|
||||
entries having runlevel \fBa\fP,\fBb\fP or \fBc\fP.
|
||||
.IP "\fBQ\fP or \fBq\fP"
|
||||
tell \fBinit\fP to re-examine the \fB/etc/inittab\fP file.
|
||||
.IP "\fBS\fP or \fBs\fP"
|
||||
tell \fBinit\fP to switch to single user mode.
|
||||
.IP "\fBU\fP or \fBu\fP"
|
||||
tell \fBinit\fP to re-execute itself (preserving the state). No re-examining of
|
||||
\fB/etc/inittab\fP file happens. Run level should be one of
|
||||
\fBSs0123456\fP
|
||||
otherwise request would be silently ignored.
|
||||
.PP
|
||||
\fBtelinit\fP can tell \fBinit\fP how long it should wait
|
||||
between sending processes the SIGTERM and SIGKILL signals. The default
|
||||
is 5 seconds, but this can be changed with the \fB-t\fP option.
|
||||
.PP
|
||||
\fBtelinit -e\fP tells \fBinit\fP to change the environment
|
||||
for processes it spawns.
|
||||
The argument of \fB-e\fP is either of the form \fIVAR\fP=\fIVAL\fP
|
||||
which sets variable \fIVAR\fP to value \fIVAL\fP,
|
||||
or of the form \fIVAR\fP
|
||||
(without an equality sign)
|
||||
which unsets variable \fIVAR\fP.
|
||||
.PP
|
||||
\fBtelinit\fP can be invoked only by users with appropriate
|
||||
privileges.
|
||||
.PP
|
||||
The \fBinit\fP binary checks if it is \fBinit\fP or \fBtelinit\fP by looking
|
||||
at its \fIprocess id\fP; the real \fBinit\fP's process id is always \fB1\fP.
|
||||
From this it follows that instead of calling \fBtelinit\fP one can also
|
||||
just use \fBinit\fP instead as a shortcut.
|
||||
.\"}}}
|
||||
.\"}}}
|
||||
.SH ENVIRONMENT
|
||||
\fBInit\fP sets the following environment variables for all its children:
|
||||
.IP \fBPATH\fP
|
||||
\fI/bin:/usr/bin:/sbin:/usr/sbin\fP
|
||||
.IP \fBINIT_VERSION\fP
|
||||
As the name says. Useful to determine if a script runs directly from \fBinit\fP.
|
||||
.IP \fBRUNLEVEL\fP
|
||||
The current system runlevel.
|
||||
.IP \fBPREVLEVEL\fP
|
||||
The previous runlevel (useful after a runlevel switch).
|
||||
.IP \fBCONSOLE\fP
|
||||
The system console. This is really inherited from the kernel; however
|
||||
if it is not set \fBinit\fP will set it to \fB/dev/console\fP by default.
|
||||
.SH BOOTFLAGS
|
||||
It is possible to pass a number of flags to \fBinit\fP from the
|
||||
boot monitor (eg. LILO). \fBInit\fP accepts the following flags:
|
||||
.TP 0.5i
|
||||
.B -s, S, single
|
||||
Single user mode boot. In this mode \fI/etc/inittab\fP is
|
||||
examined and the bootup rc scripts are usually run before
|
||||
the single user mode shell is started.
|
||||
.PP
|
||||
.TP 0.5i
|
||||
.B 1-5
|
||||
Runlevel to boot into.
|
||||
.PP
|
||||
.TP 0.5i
|
||||
.B -b, emergency
|
||||
Boot directly into a single user shell without running any
|
||||
other startup scripts.
|
||||
.PP
|
||||
.TP 0.5i
|
||||
.B -a, auto
|
||||
The LILO boot loader adds the word "auto" to the command line if it
|
||||
booted the kernel with the default command line (without user intervention).
|
||||
If this is found \fBinit\fP sets the "AUTOBOOT" environment
|
||||
variable to "yes". Note that you cannot use this for any security
|
||||
measures - of course the user could specify "auto" or \-a on the
|
||||
command line manually.
|
||||
.PP
|
||||
.TP 0.5i
|
||||
.BI "-z " xxx
|
||||
The argument to \fB-z\fP is ignored. You can use this to expand the command
|
||||
line a bit, so that it takes some more space on the stack. \fBInit\fP
|
||||
can then manipulate the command line so that \fBps\fP(1) shows
|
||||
the current runlevel.
|
||||
.PP
|
||||
.SH INTERFACE
|
||||
Init listens on a \fIfifo\fP in /dev, \fI/dev/initctl\fP, for messages.
|
||||
\fBTelinit\fP uses this to communicate with init. The interface is not
|
||||
very well documented or finished. Those interested should study the
|
||||
\fIinitreq.h\fP file in the \fIsrc/\fP subdirectory of the \fBinit\fP
|
||||
source code tar archive.
|
||||
.SH SIGNALS
|
||||
Init reacts to several signals:
|
||||
.TP 0.5i
|
||||
.B SIGHUP
|
||||
Has the same effect as \fBtelinit q\fP.
|
||||
.PP
|
||||
.TP 0.5i
|
||||
.B SIGUSR1
|
||||
On receipt of this signals, init closes and re-opens its control fifo,
|
||||
\fB/dev/initctl\fP. Useful for bootscripts when /dev is remounted.
|
||||
.TP 0.5i
|
||||
.B SIGINT
|
||||
Normally the kernel sends this signal to init when CTRL-ALT-DEL is
|
||||
pressed. It activates the \fIctrlaltdel\fP action.
|
||||
.TP 0.5i
|
||||
.B SIGWINCH
|
||||
The kernel sends this signal when the \fIKeyboardSignal\fP key is hit.
|
||||
It activates the \fIkbrequest\fP action.
|
||||
\"{{{ Conforming to
|
||||
.SH CONFORMING TO
|
||||
\fBInit\fP is compatible with the System V init. It works closely
|
||||
together with the scripts in the directories
|
||||
\fI/etc/init.d\fP and \fI/etc/rc{runlevel}.d\fP.
|
||||
If your system uses this convention, there should be a \fIREADME\fP
|
||||
file in the directory \fI/etc/init.d\fP explaining how these scripts work.
|
||||
.\"}}}
|
||||
.\"{{{ Files
|
||||
.SH FILES
|
||||
.nf
|
||||
/etc/inittab
|
||||
/etc/initscript
|
||||
/dev/console
|
||||
/var/run/utmp
|
||||
/var/log/wtmp
|
||||
/dev/initctl
|
||||
.fi
|
||||
.\"}}}
|
||||
.\"{{{ Warnings
|
||||
.SH WARNINGS
|
||||
\fBInit\fP assumes that processes and descendants of processes
|
||||
remain in the same process group which was originally created
|
||||
for them. If the processes change their group, \fBinit\fP can't
|
||||
kill them and you may end up with two processes reading from one
|
||||
terminal line.
|
||||
.\"}}}
|
||||
.\"{{{ Diagnostics
|
||||
.SH DIAGNOSTICS
|
||||
If \fBinit\fP finds that it is continuously respawning an entry
|
||||
more than 10 times in 2 minutes, it will assume that there is an error
|
||||
in the command string, generate an error message on the system console,
|
||||
and refuse to respawn this entry until either 5 minutes has elapsed or
|
||||
it receives a signal. This prevents it from eating up system resources
|
||||
when someone makes a typographical error in the \fB/etc/inittab\fP file
|
||||
or the program for the entry is removed.
|
||||
.\"}}}
|
||||
.\"{{{ Author
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg (miquels@cistron.nl), initial manual
|
||||
page by Michael Haardt (u31b3hs@pool.informatik.rwth-aachen.de).
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
.BR getty (1),
|
||||
.BR login (1),
|
||||
.BR sh (1),
|
||||
.BR runlevel (8),
|
||||
.BR shutdown(8),
|
||||
.BR kill (1),
|
||||
.BR inittab (5),
|
||||
.BR initscript (5),
|
||||
.BR utmp (5)
|
||||
.\"}}}
|
72
man/initscript.5
Normal file
72
man/initscript.5
Normal file
@@ -0,0 +1,72 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2003 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH INITSCRIPT 5 "July 10, 2003" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
initscript \- script that executes inittab commands.
|
||||
.SH SYNOPSIS
|
||||
/bin/sh /etc/initscript id runlevels action process
|
||||
.SH DESCRIPTION
|
||||
When the shell script \fI/etc/initscript\fP is present, \fBinit\fP
|
||||
will use it to execute the commands from \fIinittab\fP.
|
||||
This script can be used to set things like \fBulimit\fP and
|
||||
\fBumask\fP default values for every process.
|
||||
.SH EXAMPLES
|
||||
This is a sample initscript, which might be installed on your
|
||||
system as \fI/etc/initscript.sample\fP.
|
||||
.RS
|
||||
.sp
|
||||
.nf
|
||||
.ne 7
|
||||
|
||||
#
|
||||
# initscript Executed by init(8) for every program it
|
||||
# wants to spawn like this:
|
||||
#
|
||||
# /bin/sh /etc/initscript <id> <level> <action> <process>
|
||||
#
|
||||
|
||||
# Set umask to safe level, and enable core dumps.
|
||||
umask 022
|
||||
ulimit -c 2097151
|
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin
|
||||
export PATH
|
||||
|
||||
# Increase the hard file descriptor limit for all processes
|
||||
# to 8192. The soft limit is still 1024, but any unprivileged
|
||||
# process can increase its soft limit up to the hard limit
|
||||
# with "ulimit -Sn xxx" (needs a 2.2.13 or later Linux kernel).
|
||||
ulimit -Hn 8192
|
||||
|
||||
# Execute the program.
|
||||
eval exec "$4"
|
||||
|
||||
.sp
|
||||
.RE
|
||||
.SH NOTES
|
||||
This script is not meant as startup script for daemons or somesuch.
|
||||
It has nothing to do with a \fIrc.local\fP style script. It's just
|
||||
a handler for things executed from \fB/etc/inittab\fP. Experimenting
|
||||
with this can make your system un(re)bootable.
|
||||
.RE
|
||||
.SH FILES
|
||||
/etc/inittab,
|
||||
/etc/initscript.
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg ,<miquels@cistron.nl>
|
||||
.SH "SEE ALSO"
|
||||
init(8), inittab(5).
|
265
man/inittab.5
Normal file
265
man/inittab.5
Normal file
@@ -0,0 +1,265 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2001 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH INITTAB 5 "Dec 4, 2001" "" "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
inittab \- format of the inittab file used by the sysv-compatible init
|
||||
process
|
||||
.\"}}}
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
The \fBinittab\fP file describes which processes are started at bootup and
|
||||
during normal operation (e.g.\& /etc/init.d/boot, /etc/init.d/rc, gettys...).
|
||||
.BR Init (8)
|
||||
distinguishes multiple \fIrunlevels\fP, each of which can have its own set of
|
||||
processes that are started. Valid runlevels are \fB0\fP\-\fB6\fP plus
|
||||
\fBA\fP, \fBB\fP, and \fBC\fP for \fBondemand\fP entries. An entry in the
|
||||
\fBinittab\fP file has the following format:
|
||||
.RS
|
||||
.sp
|
||||
\fIid\fP:\fIrunlevels\fP:\fIaction\fP:\fIprocess\fP
|
||||
.sp
|
||||
.RE
|
||||
Lines beginning with `#' are ignored.
|
||||
.\"{{{ id
|
||||
.IP \fIid\fP
|
||||
is a unique sequence of 1-4 characters which identifies an entry in
|
||||
.B inittab
|
||||
(for versions of sysvinit compiled with the \fIold\fP libc5 (< 5.2.18) or
|
||||
a.out libraries the limit is 2 characters).
|
||||
.sp
|
||||
Note: traditionally, for getty and other login processes, the value of the
|
||||
\fIid\fP field is kept the same as the suffix of the corresponding tty, e.g.\&
|
||||
\fB1\fP for \fBtty1\fP. Some ancient login accounting programs might
|
||||
expect this, though I can't think of any.
|
||||
.\"}}}
|
||||
.\"{{{ runlevels
|
||||
.IP \fIrunlevels\fP
|
||||
lists the runlevels for which the specified action should be taken.
|
||||
.\"}}}
|
||||
.\"{{{ action
|
||||
.IP \fIaction\fP
|
||||
describes which action should be taken.
|
||||
.\"}}}
|
||||
.\"{{{ process
|
||||
.IP \fIprocess\fP
|
||||
specifies the process to be executed. If the process field starts with
|
||||
a `+' character,
|
||||
.B init
|
||||
will not do utmp and wtmp accounting for that process. This is needed for
|
||||
gettys that insist on doing their own utmp/wtmp housekeeping. This is also
|
||||
a historic bug.
|
||||
.\"}}}
|
||||
.PP
|
||||
The \fIrunlevels\fP field may contain multiple characters for different
|
||||
runlevels. For example, \fB123\fP specifies that the process should be
|
||||
started in runlevels 1, 2, and 3.
|
||||
The \fIrunlevels\fP for \fBondemand\fP entries may contain an \fBA\fP,
|
||||
\fBB\fP, or \fBC\fP. The \fIrunlevels\fP field of \fBsysinit\fP,
|
||||
\fBboot\fP, and \fBbootwait\fP entries are ignored.
|
||||
.PP
|
||||
When the system runlevel is changed, any running processes that are not
|
||||
specified for the new runlevel are killed, first with \s-2SIGTERM\s0,
|
||||
then with \s-2SIGKILL\s0.
|
||||
.PP
|
||||
Valid actions for the \fIaction\fP field are:
|
||||
.\"{{{ respawn
|
||||
.IP \fBrespawn\fP
|
||||
The process will be restarted whenever it terminates (e.g.\& getty).
|
||||
.\"}}}
|
||||
.\"{{{ wait
|
||||
.IP \fBwait\fP
|
||||
The process will be started once when the specified runlevel is entered and
|
||||
.B init
|
||||
will wait for its termination.
|
||||
.\"}}}
|
||||
.\"{{{ once
|
||||
.IP \fBonce\fP
|
||||
The process will be executed once when the specified runlevel is
|
||||
entered.
|
||||
.\"}}}
|
||||
.\"{{{ boot
|
||||
.IP \fBboot\fP
|
||||
The process will be executed during system boot. The \fIrunlevels\fP
|
||||
field is ignored.
|
||||
.\"}}}
|
||||
.\"{{{ bootwait
|
||||
.IP \fBbootwait\fP
|
||||
The process will be executed during system boot, while
|
||||
.B init
|
||||
waits for its termination (e.g.\& /etc/rc).
|
||||
The \fIrunlevels\fP field is ignored.
|
||||
.\"}}}
|
||||
.\"{{{ off
|
||||
.IP \fBoff\fP
|
||||
This does nothing.
|
||||
.\"}}}
|
||||
.\"{{{ ondemand
|
||||
.IP \fBondemand\fP
|
||||
A process marked with an \fBondemand\fP runlevel will be executed
|
||||
whenever the specified \fBondemand\fP runlevel is called. However, no
|
||||
runlevel change will occur (\fBondemand\fP runlevels are `a', `b',
|
||||
and `c').
|
||||
.\"}}}
|
||||
.\"{{{ initdefault
|
||||
.IP \fBinitdefault\fP
|
||||
An \fBinitdefault\fP entry specifies the runlevel which should be
|
||||
entered after system boot. If none exists,
|
||||
.B init
|
||||
will ask for a runlevel on the console. The \fIprocess\fP field is ignored.
|
||||
.\"}}}
|
||||
.\"{{{ sysinit
|
||||
.IP \fBsysinit\fP
|
||||
The process will be executed during system boot. It will be
|
||||
executed before any \fBboot\fP or \fB bootwait\fP entries.
|
||||
The \fIrunlevels\fP field is ignored.
|
||||
.\"}}}
|
||||
.\"{{{ powerwait
|
||||
.IP \fBpowerwait\fP
|
||||
The process will be executed when the power goes down. Init is usually
|
||||
informed about this by a process talking to a UPS connected to the computer.
|
||||
\fBInit\fP will wait for the process to finish before continuing.
|
||||
.\"}}}
|
||||
.\"{{{ powerfail
|
||||
.IP \fBpowerfail\fP
|
||||
As for \fBpowerwait\fP, except that \fBinit\fP does not wait for the process's
|
||||
completion.
|
||||
.\"}}}
|
||||
.\"{{{ powerokwait
|
||||
.IP \fBpowerokwait\fP
|
||||
This process will be executed as soon as \fBinit\fP is informed that the
|
||||
power has been restored.
|
||||
.\"}}}
|
||||
.\"{{{ powerfailnow
|
||||
.IP \fBpowerfailnow\fP
|
||||
This process will be executed when \fBinit\fP is told that the battery of
|
||||
the external UPS is almost empty and the power is failing (provided that the
|
||||
external UPS and the monitoring process are able to detect this condition).
|
||||
.\"}}}
|
||||
.\"{{{ ctrlaltdel
|
||||
.IP \fBctrlaltdel\fP
|
||||
The process will be executed when \fBinit\fP receives the SIGINT signal.
|
||||
This means that someone on the system console has pressed the
|
||||
\fBCTRL\-ALT\-DEL\fP key combination. Typically one wants to execute some
|
||||
sort of \fBshutdown\fP either to get into single\-user level or to
|
||||
reboot the machine.
|
||||
.\"}}}
|
||||
.\"{{{ kbrequest
|
||||
.IP \fBkbrequest\fP
|
||||
The process will be executed when \fBinit\fP receives a signal from the
|
||||
keyboard handler that a special key combination was pressed on the
|
||||
console keyboard.
|
||||
.sp
|
||||
The documentation for this function is not complete yet; more documentation
|
||||
can be found in the kbd-x.xx packages (most recent was kbd-0.94 at
|
||||
the time of this writing). Basically you want to map some keyboard
|
||||
combination to the "KeyboardSignal" action. For example, to map Alt-Uparrow
|
||||
for this purpose use the following in your keymaps file:
|
||||
.RS
|
||||
.sp
|
||||
alt keycode 103 = KeyboardSignal
|
||||
.sp
|
||||
.RE
|
||||
.\"}}}
|
||||
.\"}}}
|
||||
.\"{{{ Examples
|
||||
.SH EXAMPLES
|
||||
This is an example of a inittab which resembles the old Linux inittab:
|
||||
.RS
|
||||
.sp
|
||||
.nf
|
||||
.ne 7
|
||||
# inittab for linux
|
||||
id:1:initdefault:
|
||||
rc::bootwait:/etc/rc
|
||||
1:1:respawn:/etc/getty 9600 tty1
|
||||
2:1:respawn:/etc/getty 9600 tty2
|
||||
3:1:respawn:/etc/getty 9600 tty3
|
||||
4:1:respawn:/etc/getty 9600 tty4
|
||||
.fi
|
||||
.sp
|
||||
.RE
|
||||
This inittab file executes \fB/etc/rc\fP during boot and starts gettys
|
||||
on tty1\-tty4.
|
||||
.PP
|
||||
A more elaborate \fBinittab\fP with different runlevels (see the comments
|
||||
inside):
|
||||
.RS
|
||||
.sp
|
||||
.nf
|
||||
.ne 19
|
||||
# Level to run in
|
||||
id:2:initdefault:
|
||||
|
||||
# Boot-time system configuration/initialization script.
|
||||
si::sysinit:/etc/init.d/rcS
|
||||
|
||||
# What to do in single-user mode.
|
||||
~:S:wait:/sbin/sulogin
|
||||
|
||||
# /etc/init.d executes the S and K scripts upon change
|
||||
# of runlevel.
|
||||
#
|
||||
# Runlevel 0 is halt.
|
||||
# Runlevel 1 is single-user.
|
||||
# Runlevels 2-5 are multi-user.
|
||||
# Runlevel 6 is reboot.
|
||||
|
||||
l0:0:wait:/etc/init.d/rc 0
|
||||
l1:1:wait:/etc/init.d/rc 1
|
||||
l2:2:wait:/etc/init.d/rc 2
|
||||
l3:3:wait:/etc/init.d/rc 3
|
||||
l4:4:wait:/etc/init.d/rc 4
|
||||
l5:5:wait:/etc/init.d/rc 5
|
||||
l6:6:wait:/etc/init.d/rc 6
|
||||
|
||||
# What to do at the "3 finger salute".
|
||||
ca::ctrlaltdel:/sbin/shutdown -t1 -h now
|
||||
|
||||
# Runlevel 2,3: getty on virtual consoles
|
||||
# Runlevel 3: getty on terminal (ttyS0) and modem (ttyS1)
|
||||
1:23:respawn:/sbin/getty tty1 VC linux
|
||||
2:23:respawn:/sbin/getty tty2 VC linux
|
||||
3:23:respawn:/sbin/getty tty3 VC linux
|
||||
4:23:respawn:/sbin/getty tty4 VC linux
|
||||
S0:3:respawn:/sbin/getty -L 9600 ttyS0 vt320
|
||||
S1:3:respawn:/sbin/mgetty -x0 -D ttyS1
|
||||
|
||||
.fi
|
||||
.sp
|
||||
.RE
|
||||
.\"}}}
|
||||
.\"{{{ Files
|
||||
.SH FILES
|
||||
/etc/inittab
|
||||
.\"}}}
|
||||
.\"{{{ Author
|
||||
.SH AUTHOR
|
||||
\fBInit\fP was written by Miquel van Smoorenburg
|
||||
(miquels@cistron.nl). This manual page was written by
|
||||
Sebastian Lederer (lederer@francium.informatik.uni-bonn.de) and modified
|
||||
by Michael Haardt (u31b3hs@pool.informatik.rwth-aachen.de).
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
.BR init (8),
|
||||
.BR telinit (8)
|
||||
.\"}}}
|
49
man/killall5.8
Normal file
49
man/killall5.8
Normal file
@@ -0,0 +1,49 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2003 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH KILLALL5 8 "04 Nov 2003" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
killall5 -- send a signal to all processes.
|
||||
.SH SYNOPSIS
|
||||
.B killall5
|
||||
.RB -signalnumber
|
||||
.RB [ \-o
|
||||
.IR omitpid ]
|
||||
.RB [ \-o
|
||||
.IR omitpid.. ]
|
||||
.SH DESCRIPTION
|
||||
.B killall5
|
||||
is the SystemV killall command. It sends a signal to all processes except
|
||||
kernel threads and the processes in its own session, so it won't kill
|
||||
the shell that is running the script it was called from. Its primary
|
||||
(only) use is in the \fBrc\fP scripts found in the /etc/init.d directory.
|
||||
.SH OPTIONS
|
||||
.IP "-o \fIomitpid\fP"
|
||||
Tells \fIkillall5\fP to omit processes with that process id.
|
||||
.SH NOTES
|
||||
\fIkillall5\fP can also be invoked as pidof, which is simply a
|
||||
(symbolic) link to the \fIkillall5\fP program.
|
||||
.SH EXIT STATUS
|
||||
The program return zero if it killed processes. It return 2 if no
|
||||
process were killed, and 1 if it was unable to find any processes
|
||||
(/proc/ is missing).
|
||||
.SH SEE ALSO
|
||||
.BR halt (8),
|
||||
.BR reboot (8),
|
||||
.BR pidof (8)
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
122
man/last.1
Normal file
122
man/last.1
Normal file
@@ -0,0 +1,122 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2004 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH LAST,LASTB 1 "Jul 31, 2004" "" "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
last, lastb \- show listing of last logged in users
|
||||
.\"}}}
|
||||
.\"{{{ Synopsis
|
||||
.SH SYNOPSIS
|
||||
.B last
|
||||
.RB [ \-R ]
|
||||
.RB [ \-\fInum\fP ]
|
||||
.RB "[ \-\fBn\fP \fInum\fP ]"
|
||||
.RB [ \-adFiox ]
|
||||
.RB "[ \-\fBf\fP \fIfile\fP ]"
|
||||
.RB "[ \-\fBt\fP \fIYYYYMMDDHHMMSS\fP ]"
|
||||
.RI [ name... ]
|
||||
.RI [ tty... ]
|
||||
.br
|
||||
.B lastb
|
||||
.RB [ \-R ]
|
||||
.RB [ \-\fInum\fP ]
|
||||
.RB "[ \-\fBn\fP \fInum\fP ]"
|
||||
.RB "[ \-\fBf\fP \fIfile\fP ]"
|
||||
.RB [ \-adFiox ]
|
||||
.RI [ name... ]
|
||||
.RI [ tty... ]
|
||||
.\"}}}
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
.B Last
|
||||
searches back through the file \fB/var/log/wtmp\fP (or the file
|
||||
designated by the \fB\-f\fP flag) and displays a list of all
|
||||
users logged in (and out) since that file was created. Names of users
|
||||
and tty's can be given, in which case \fBlast\fP will show only those entries
|
||||
matching the arguments. Names of ttys can be abbreviated, thus \fBlast
|
||||
0\fP is the same as \fBlast tty0\fP.
|
||||
.PP
|
||||
When \fBlast\fP catches a \s-2SIGINT\s0 signal (generated by the interrupt key,
|
||||
usually control-C) or a \s-2SIGQUIT\s0 signal (generated by the quit key,
|
||||
usually control-\e), \fBlast\fP will show how far it has searched through the
|
||||
file; in the case of the \s-2SIGINT\s0 signal \fBlast\fP will then terminate.
|
||||
.PP
|
||||
The pseudo user \fBreboot\fP logs in each time the system is rebooted.
|
||||
Thus \fBlast reboot\fP will show a log of all reboots since the log file
|
||||
was created.
|
||||
.PP
|
||||
\fBLastb\fP is the same as \fBlast\fP, except that by default it shows a log
|
||||
of the file \fB/var/log/btmp\fP, which contains all the bad login attempts.
|
||||
.\"}}}
|
||||
.\"{{{ Options
|
||||
.SH OPTIONS
|
||||
.IP "\fB\-f\fP \fIfile\fP"
|
||||
Tells \fBlast\fP to use a specific file instead of \fB/var/log/wtmp\fP.
|
||||
.IP \fB\-\fP\fInum\fP
|
||||
This is a count telling \fBlast\fP how many lines to show.
|
||||
.IP "\fB\-n\fP \fInum\fP"
|
||||
The same.
|
||||
.IP "\fB\-t\fP \fIYYYYMMDDHHMMSS\fP"
|
||||
Display the state of logins as of the specified time. This is
|
||||
useful, e.g., to determine easily who was logged in at a particular
|
||||
time -- specify that time with \fB\-t\fP and look for "still logged
|
||||
in".
|
||||
.IP \fB\-R\fP
|
||||
Suppresses the display of the hostname field.
|
||||
.IP \fB\-a\fP
|
||||
Display the hostname in the last column. Useful in combination
|
||||
with the next flag.
|
||||
.IP \fB\-d\fP
|
||||
For non-local logins, Linux stores not only the host name of the remote
|
||||
host but its IP number as well. This option translates the IP number
|
||||
back into a hostname.
|
||||
.IP \fB\-F\fP
|
||||
Print full login and logout times and dates.
|
||||
.IP \fB\-i\fP
|
||||
This option is like \fB-d\fP in that it displays the IP number of the remote
|
||||
host, but it displays the IP number in numbers-and-dots notation.
|
||||
.IP \fB\-o\fP
|
||||
Read an old-type wtmp file (written by linux-libc5 applications).
|
||||
.IP \fB\-x\fP
|
||||
Display the system shutdown entries and run level changes.
|
||||
.\"}}}
|
||||
.SH NOTES
|
||||
The files \fIwtmp\fP and \fIbtmp\fP might not be found. The system only
|
||||
logs information in these files if they are present. This is a local
|
||||
configuration issue. If you want the files to be used, they can be
|
||||
created with a simple \fBtouch\fP(1) command (for example,
|
||||
\fItouch /var/log/wtmp\fP).
|
||||
.\"{{{ Files
|
||||
.SH FILES
|
||||
/var/log/wtmp
|
||||
.br
|
||||
/var/log/btmp
|
||||
.\"}}}
|
||||
.\"{{{ Author
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
.BR shutdown (8),
|
||||
.BR login (1),
|
||||
.BR init (8)
|
||||
.\"}}}
|
1
man/lastb.1
Normal file
1
man/lastb.1
Normal file
@@ -0,0 +1 @@
|
||||
.so man1/last.1
|
61
man/mesg.1
Normal file
61
man/mesg.1
Normal file
@@ -0,0 +1,61 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2001 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH MESG 1 "Feb 26, 2001" "" "Linux User's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
mesg \- control write access to your terminal
|
||||
.\"}}}
|
||||
.\"{{{ Synopsis
|
||||
.SH SYNOPSIS
|
||||
.B mesg
|
||||
.RB [ y | n ]
|
||||
.\"}}}
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
.B Mesg
|
||||
controls the access to your terminal by others. It's typically used to
|
||||
allow or disallow other users to write to your terminal (see \fBwrite\fP(1)).
|
||||
.\"}}}
|
||||
.\"{{{ Options
|
||||
.SH OPTIONS
|
||||
.IP \fBy\fP
|
||||
Allow write access to your terminal.
|
||||
.IP \fBn\fP
|
||||
Disallow write access to your terminal.
|
||||
.PP
|
||||
If no option is given, \fBmesg\fP prints out the current access state of your
|
||||
terminal.
|
||||
.\"}}}
|
||||
.\"{{{ Notes
|
||||
.SH NOTES
|
||||
\fBMesg\fP assumes that its standard input is connected to your
|
||||
terminal. That also means that if you are logged in multiple times,
|
||||
you can get/set the mesg status of other sessions by using redirection.
|
||||
For example "mesg n < /dev/pts/46".
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg (miquels@cistron.nl)
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
.BR talk (1),
|
||||
.BR write (1),
|
||||
.BR wall (1)
|
||||
.\"}}}
|
54
man/mountpoint.1
Normal file
54
man/mountpoint.1
Normal file
@@ -0,0 +1,54 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2004 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH MOUNTPOINT 1 "Mar 15, 2004" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
mountpoint \- see if a directory is a mountpoint
|
||||
.SH SYNOPSIS
|
||||
.B /bin/mountpoint
|
||||
.RB [ \-q ]
|
||||
.RB [ \-d ]
|
||||
.I /path/to/directory
|
||||
.br
|
||||
.B /bin/mountpoint
|
||||
.RB \-x
|
||||
.I /dev/device
|
||||
.SH DESCRIPTION
|
||||
\fBMountpoint\fP checks if the directory is a mountpoint.
|
||||
|
||||
.SH OPTIONS
|
||||
.IP \fB\-q\fP
|
||||
Be quiet - don't print anything.
|
||||
.IP \fB\-d\fP
|
||||
Print major/minor device number of the filesystem on stdout.
|
||||
.IP \fB\-x\fP
|
||||
Print major/minor device number of the blockdevice on stdout.
|
||||
.SH EXIT STATUS
|
||||
Zero if the directory is a mountpoint, non-zero if not.
|
||||
.SH NOTES
|
||||
Symbolic links are not followed, except when the \fB-x\fP option is
|
||||
used. To force following symlinks, add a trailing slash to the
|
||||
path of the directory.
|
||||
.PP
|
||||
The name of the command is misleading when the -x option is used,
|
||||
but the option is useful for comparing if a directory and a device
|
||||
match up, and there is no other command that can print the info easily.
|
||||
.PP
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.SH "SEE ALSO"
|
||||
.BR stat (1)
|
78
man/pidof.8
Normal file
78
man/pidof.8
Normal file
@@ -0,0 +1,78 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH PIDOF 8 "01 Sep 1998" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
pidof -- find the process ID of a running program.
|
||||
.SH SYNOPSIS
|
||||
.B pidof
|
||||
.RB [ \-s ]
|
||||
.RB [ \-c ]
|
||||
.RB [ \-x ]
|
||||
.RB [ \-o
|
||||
.IR omitpid ]
|
||||
.RB [ \-o
|
||||
.IR omitpid.. ]
|
||||
.B program
|
||||
.RB [ program.. ]
|
||||
.SH DESCRIPTION
|
||||
.B Pidof
|
||||
finds the process id's (pids) of the named programs. It prints those
|
||||
id's on the standard output. This program is on some systems used in
|
||||
run-level change scripts, especially when the system has a
|
||||
\fISystem-V\fP like \fIrc\fP structure. In that case these scripts are
|
||||
located in /etc/rc?.d, where ? is the runlevel. If the system has
|
||||
a
|
||||
.B start-stop-daemon
|
||||
(8) program that should be used instead.
|
||||
.SH OPTIONS
|
||||
.IP -s
|
||||
Single shot - this instructs the program to only return one \fIpid\fP.
|
||||
.IP -c
|
||||
Only return process ids that are running with the same root directory.
|
||||
This option is ignored for non-root users, as they will be unable to check
|
||||
the current root directory of processes they do not own.
|
||||
.IP -x
|
||||
Scripts too - this causes the program to also return process id's of
|
||||
shells running the named scripts.
|
||||
.IP "-o \fIomitpid\fP"
|
||||
Tells \fIpidof\fP to omit processes with that process id. The special
|
||||
pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
|
||||
program, in other words the calling shell or shell script.
|
||||
.SH "EXIT STATUS"
|
||||
.TP
|
||||
.B 0
|
||||
At least one program was found with the requested name.
|
||||
.TP
|
||||
.B 1
|
||||
No program was found with the requested name.
|
||||
.SH NOTES
|
||||
\fIpidof\fP is actually the same program as \fIkillall5\fP;
|
||||
the program behaves according to the name under which it is called.
|
||||
.PP
|
||||
When \fIpidof\fP is invoked with a full pathname to the program it
|
||||
should find the pid of, it is reasonably safe. Otherwise it is possible
|
||||
that it returns pids of running programs that happen to have the same name
|
||||
as the program you're after but are actually other programs.
|
||||
.SH SEE ALSO
|
||||
.BR shutdown (8),
|
||||
.BR init (8),
|
||||
.BR halt (8),
|
||||
.BR reboot (8),
|
||||
.BR killall5 (8)
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
1
man/poweroff.8
Normal file
1
man/poweroff.8
Normal file
@@ -0,0 +1 @@
|
||||
.so man8/halt.8
|
1
man/reboot.8
Normal file
1
man/reboot.8
Normal file
@@ -0,0 +1 @@
|
||||
.so man8/halt.8
|
56
man/runlevel.8
Normal file
56
man/runlevel.8
Normal file
@@ -0,0 +1,56 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1997 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH RUNLEVEL 8 "May 27, 1997" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
runlevel -- find the previous and current system runlevel.
|
||||
.SH SYNOPSIS
|
||||
.B runlevel
|
||||
.RI [ utmp ]
|
||||
.SH DESCRIPTION
|
||||
.B Runlevel
|
||||
reads the system
|
||||
.I utmp
|
||||
file (typically
|
||||
.IR /var/run/utmp )
|
||||
to locate the runlevel record, and then
|
||||
prints the previous and current system runlevel on its standard output,
|
||||
separated by a single space. If there is no previous system
|
||||
runlevel, the letter \fBN\fP will be printed instead.
|
||||
.PP
|
||||
If no
|
||||
.I utmp
|
||||
file exists, or if no runlevel record can be found,
|
||||
.B runlevel
|
||||
prints the word \fBunknown\fP and exits with an error.
|
||||
.PP
|
||||
.B Runlevel
|
||||
can be used in \fIrc\fP scripts as a substitute for the System-V
|
||||
\fBwho -r\fP command.
|
||||
However, in newer versions of \fBinit\fP(8) this information
|
||||
is also available in the environment variables \fBRUNLEVEL\fP and
|
||||
\fBPREVLEVEL\fP.
|
||||
.SH OPTIONS
|
||||
.\"{{{ utmp
|
||||
.IP \fIutmp\fP
|
||||
The name of the \fIutmp\fP file to read.
|
||||
.\"}}}
|
||||
.SH SEE ALSO
|
||||
.BR init (8),
|
||||
.BR utmp (5)
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
214
man/shutdown.8
Normal file
214
man/shutdown.8
Normal file
@@ -0,0 +1,214 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2003 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH SHUTDOWN 8 "November 12, 2003" "" "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
shutdown \- bring the system down
|
||||
.\"}}}
|
||||
.\"{{{ Synopsis
|
||||
.SH SYNOPSIS
|
||||
.B /sbin/shutdown
|
||||
.RB [ \-t
|
||||
.IR sec ]
|
||||
.RB [ \-arkhncfFHP ]
|
||||
.I time
|
||||
.RI [ warning-message ]
|
||||
.\"}}}
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
\fBshutdown\fP brings the system down in a secure way. All logged-in users are
|
||||
notified that the system is going down, and \fBlogin\fP(1) is blocked.
|
||||
It is possible to shut the system down immediately or after a specified delay.
|
||||
All processes are first notified that the system is going down by the
|
||||
signal \s-2SIGTERM\s0. This gives programs like \fBvi\fP(1)
|
||||
the time to save the file being edited,
|
||||
mail and news processing programs a chance to exit cleanly, etc.
|
||||
\fBshutdown\fP does its job by signalling the \fBinit\fP process,
|
||||
asking it to change the runlevel.
|
||||
Runlevel \fB0\fP is used to halt the system, runlevel \fB6\fP is used
|
||||
to reboot the system, and runlevel \fB1\fP is used to put to system into
|
||||
a state where administrative tasks can be performed; this is the default
|
||||
if neither the \fI-h\fP or \fI-r\fP flag is given to \fBshutdown\fP.
|
||||
To see which actions are taken on halt or reboot see the appropriate
|
||||
entries for these runlevels in the file \fI/etc/inittab\fP.
|
||||
.\"}}}
|
||||
.\"{{{ Options
|
||||
.SH OPTIONS
|
||||
.\"{{{ -a
|
||||
.IP "\fB\-a\fP
|
||||
Use \fB/etc/shutdown.allow\fP.
|
||||
.\"}}}
|
||||
.\"{{{ -t sec
|
||||
.IP "\fB\-t\fP \fIsec\fP"
|
||||
Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending processes the
|
||||
warning and the kill signal, before changing to another runlevel.
|
||||
.\"}}}
|
||||
.\"{{{ -k
|
||||
.IP \fB\-k\fP
|
||||
Don't really shutdown; only send the warning messages to everybody.
|
||||
.\"}}}
|
||||
.\"{{{ -r
|
||||
.IP \fB\-r\fP
|
||||
Reboot after shutdown.
|
||||
.\"}}}
|
||||
.\"{{{ -h
|
||||
.IP \fB\-h\fP
|
||||
Halt or power off after shutdown.
|
||||
.\"}}}
|
||||
.\"{{{ -H
|
||||
.IP \fB\-H\fP
|
||||
Modifier to the -h flag. Halt action is to halt or drop into boot
|
||||
monitor on systems that support it. Must be used with the -h flag.
|
||||
.\"}}}
|
||||
.\"{{{ -P
|
||||
.IP \fB\-P\fP
|
||||
Halt action is to turn off the power.
|
||||
.\"}}}
|
||||
.\"{{{ -n
|
||||
.IP \fB\-n\fP
|
||||
[DEPRECATED] Don't call \fBinit\fP(8) to do the shutdown but do it ourself.
|
||||
The use of this option is discouraged, and its results are not always what
|
||||
you'd expect.
|
||||
.\"}}}
|
||||
.\"{{{ -f
|
||||
.IP \fB\-f\fP
|
||||
Skip fsck on reboot.
|
||||
.\"}}}
|
||||
.\"{{{ -F
|
||||
.IP \fB\-F\fP
|
||||
Force fsck on reboot.
|
||||
.\"}}}
|
||||
.\"{{{ -c
|
||||
.IP \fB\-c\fP
|
||||
Cancel an already running shutdown. With this option it is of course
|
||||
not possible to give the \fBtime\fP argument, but you can enter a
|
||||
explanatory message on the command line that will be sent to all users.
|
||||
.\"}}}
|
||||
.\"{{{ time
|
||||
.IP \fItime\fP
|
||||
When to shutdown.
|
||||
.\"}}}
|
||||
.\"{{{ warning-message
|
||||
.IP \fIwarning-message\fP
|
||||
Message to send to all users.
|
||||
.\"}}}
|
||||
.PP
|
||||
The \fItime\fP argument can have different formats. First, it can be an
|
||||
absolute time in the format \fIhh:mm\fP, in which \fIhh\fP is the hour
|
||||
(1 or 2 digits) and \fImm\fP is the minute of the hour (in two digits).
|
||||
Second, it can be in the format \fB+\fP\fIm\fP, in which \fIm\fP is the
|
||||
number of minutes to wait. The word \fBnow\fP is an alias for \fB+0\fP.
|
||||
.PP
|
||||
If shutdown is called with a delay, it will create the advisory file
|
||||
.I /etc/nologin
|
||||
which causes programs such as \fIlogin(1)\fP to not allow new user
|
||||
logins. This file is created five minutes before the shutdown sequence
|
||||
starts. Shutdown removes this file if it is stopped before it
|
||||
can signal init (i.e. it is cancelled or something goes wrong).
|
||||
It also removes it before calling init to change the runlevel.
|
||||
.PP
|
||||
The \fB\-f\fP flag means `reboot fast'. This only creates an advisory
|
||||
file \fI/fastboot\fP which can be tested by the system when it comes
|
||||
up again. The boot rc file can test if this file is present, and decide not
|
||||
to run \fBfsck\fP(1) since the system has been shut down in the proper way.
|
||||
After that, the boot process should remove \fI/fastboot\fP.
|
||||
.PP
|
||||
The \fB\-F\fP flag means `force fsck'. This only creates an advisory
|
||||
file \fI/forcefsck\fP which can be tested by the system when it comes
|
||||
up again. The boot rc file can test if this file is present, and decide
|
||||
to run \fBfsck\fP(1) with a special `force' flag so that even properly
|
||||
unmounted file systems get checked.
|
||||
After that, the boot process should remove \fI/forcefsck\fP.
|
||||
.PP
|
||||
The \fB-n\fP flag causes \fBshutdown\fP not to call \fBinit\fP,
|
||||
but to kill all running processes itself.
|
||||
\fBshutdown\fP will then turn off quota, accounting, and swapping
|
||||
and unmount all file systems.
|
||||
.\"}}}
|
||||
.\"{{{ Files
|
||||
.SH ACCESS CONTROL
|
||||
\fBshutdown\fP can be called from \fBinit\fP(8) when the magic keys
|
||||
\fBCTRL-ALT-DEL\fP are pressed, by creating an appropriate entry in
|
||||
\fI/etc/inittab\fP. This means that everyone who has physical access
|
||||
to the console keyboard can shut the system down. To prevent this,
|
||||
\fBshutdown\fP can check to see if an authorized user is logged in on
|
||||
one of the virtual consoles. If \fBshutdown\fP is called with the \fB-a\fP
|
||||
argument (add this to the invocation of shutdown in /etc/inittab),
|
||||
it checks to see if the file \fI/etc/shutdown.allow\fP is present.
|
||||
It then compares the login names in that file with the list of people
|
||||
that are logged in on a virtual console (from \fI/var/run/utmp\fP). Only
|
||||
if one of those authorized users \fBor root\fP is logged in, it will
|
||||
proceed. Otherwise it will write the message
|
||||
.sp 1
|
||||
.nf
|
||||
\fBshutdown: no authorized users logged in\fP
|
||||
.fi
|
||||
.sp 1
|
||||
to the (physical) system console. The format of \fI/etc/shutdown.allow\fP
|
||||
is one user name per line. Empty lines and comment lines (prefixed by a
|
||||
\fB#\fP) are allowed. Currently there is a limit of 32 users in this file.
|
||||
.sp 1
|
||||
Note that if \fI/etc/shutdown.allow\fP is not present, the \fB-a\fP
|
||||
argument is ignored.
|
||||
.SH HALT OR POWEROFF
|
||||
The \fB-H\fP option just sets the \fIinit\fP environment variable
|
||||
\fIINIT_HALT\fP to \fIHALT\fP, and the \fB-P\fP option just sets
|
||||
that variable to \fIPOWEROFF\fP. The shutdown script that calls
|
||||
\fBhalt\fP(8) as the last thing in the shutdown sequence should
|
||||
check these environment variables and call \fBhalt\fP(8) with
|
||||
the right options for these options to actually have any effect.
|
||||
Debian 3.1 (sarge) supports this.
|
||||
.SH FILES
|
||||
.nf
|
||||
/fastboot
|
||||
/etc/inittab
|
||||
/etc/init.d/halt
|
||||
/etc/init.d/reboot
|
||||
/etc/shutdown.allow
|
||||
.fi
|
||||
.\"}}}
|
||||
.SH NOTES
|
||||
A lot of users forget to give the \fItime\fP argument
|
||||
and are then puzzled by the error message \fBshutdown\fP produces. The
|
||||
\fItime\fP argument is mandatory; in 90 percent of all cases this argument
|
||||
will be the word \fBnow\fP.
|
||||
.PP
|
||||
Init can only capture CTRL-ALT-DEL and start shutdown in console mode.
|
||||
If the system is running the X window System, the X server processes
|
||||
all key strokes. Some X11 environments make it possible to capture
|
||||
CTRL-ALT-DEL, but what exactly is done with that event depends on
|
||||
that environment.
|
||||
.PP
|
||||
Shutdown wasn't designed to be run setuid. /etc/shutdown.allow is
|
||||
not used to find out who is executing shutdown, it ONLY checks who
|
||||
is currently logged in on (one of the) console(s).
|
||||
.\"{{{ Author
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
.BR fsck (8),
|
||||
.BR init (8),
|
||||
.BR halt (8),
|
||||
.BR poweroff (8),
|
||||
.BR reboot (8)
|
||||
.\"}}}
|
87
man/sulogin.8
Normal file
87
man/sulogin.8
Normal file
@@ -0,0 +1,87 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2006 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH SULOGIN 8 "17 Jan 2006" "" "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
sulogin \- Single-user login
|
||||
.SH SYNOPSIS
|
||||
.B sulogin
|
||||
[ \fB\-e\fP ]
|
||||
[ \fB\-p\fP ]
|
||||
[ \fB\-t\fP \fISECONDS\fP ]
|
||||
[ \fITTY\fP ]
|
||||
.SH DESCRIPTION
|
||||
.I sulogin
|
||||
is invoked by \fBinit(8)\fP when the system goes into single user mode.
|
||||
(This is done through an entry in \fIinittab(5)\fP.)
|
||||
\fBInit\fP also
|
||||
tries to execute \fIsulogin\fP when
|
||||
the boot loader (e.g., \fBgrub\fP(8))
|
||||
passes it the \fB\-b\fP option.
|
||||
.PP
|
||||
The user is prompted
|
||||
.IP "" .5i
|
||||
Give root password for system maintenance
|
||||
.br
|
||||
(or type Control\-D for normal startup):
|
||||
.PP
|
||||
\fIsulogin\fP will be connected to the current terminal, or to the
|
||||
optional device that can be specified on the command line
|
||||
(typically \fB/dev/console\fP).
|
||||
.PP
|
||||
If the \fB\-t\fP option is used then the program only waits
|
||||
the given number of seconds for user input.
|
||||
.PP
|
||||
If the \fB\-p\fP option is used then the single-user shell is invoked
|
||||
with a \fIdash\fP as the first character in \fIargv[0]\fP.
|
||||
This causes the shell process to behave as a login shell.
|
||||
The default is \fInot\fP to do this,
|
||||
so that the shell will \fInot\fP read \fB/etc/profile\fP
|
||||
or \fB$HOME/.profile\fP at startup.
|
||||
.PP
|
||||
After the user exits the single-user shell,
|
||||
or presses control\-D at the prompt,
|
||||
the system will (continue to) boot to the default runlevel.
|
||||
.SH ENVIRONMENT VARIABLES
|
||||
\fIsulogin\fP looks for the environment variable \fBSUSHELL\fP or
|
||||
\fBsushell\fP to determine what shell to start. If the environment variable
|
||||
is not set, it will try to execute root's shell from /etc/passwd. If that
|
||||
fails it will fall back to \fB/bin/sh\fP.
|
||||
.PP
|
||||
This is very valuable together with the \fB\-b\fP option to init. To boot
|
||||
the system into single user mode, with the root file system mounted read/write,
|
||||
using a special "fail safe" shell that is statically linked (this example
|
||||
is valid for the LILO bootprompt)
|
||||
.PP
|
||||
boot: linux \-b rw sushell=/sbin/sash
|
||||
.SH FALLBACK METHODS
|
||||
\fIsulogin\fP checks the root password using the standard method (getpwnam)
|
||||
first.
|
||||
Then, if the \fB\-e\fP option was specified,
|
||||
\fIsulogin\fP examines these files directly to find the root password:
|
||||
.PP
|
||||
/etc/passwd,
|
||||
.br
|
||||
/etc/shadow (if present)
|
||||
.PP
|
||||
If they are damaged or nonexistent, sulogin will start a root shell
|
||||
without asking for a password. Only use the \fB\-e\fP option if you
|
||||
are sure the console is physically protected against unauthorized access.
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg <miquels@cistron.nl>
|
||||
.SH SEE ALSO
|
||||
init(8), inittab(5).
|
1
man/telinit.8
Normal file
1
man/telinit.8
Normal file
@@ -0,0 +1 @@
|
||||
.so man8/init.8
|
75
man/wall.1
Normal file
75
man/wall.1
Normal file
@@ -0,0 +1,75 @@
|
||||
'\" -*- coding: UTF-8 -*-
|
||||
.\" Copyright (C) 1998-2003 Miquel van Smoorenburg.
|
||||
.\"
|
||||
.\" This program is free software; you can redistribute it and/or modify
|
||||
.\" it under the terms of the GNU General Public License as published by
|
||||
.\" the Free Software Foundation; either version 2 of the License, or
|
||||
.\" (at your option) any later version.
|
||||
.\"
|
||||
.\" This program is distributed in the hope that it will be useful,
|
||||
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
.\" GNU General Public License for more details.
|
||||
.\"
|
||||
.\" You should have received a copy of the GNU General Public License
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH WALL 1 "15 April 2003" "" "Linux User's Manual"
|
||||
|
||||
.SH NAME
|
||||
wall -- send a message to everybody's terminal.
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B wall
|
||||
.RB [ \-n ]
|
||||
.RB [ " message " ]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B Wall
|
||||
sends a message to everybody logged in with their
|
||||
.IR mesg (1)
|
||||
permission
|
||||
set to
|
||||
.BR yes .
|
||||
The message can be given as an argument to
|
||||
.IR wall ,
|
||||
or it can be sent to
|
||||
.IR wall 's
|
||||
standard input. When using the standard input from a terminal,
|
||||
the message should be terminated with the
|
||||
.B EOF
|
||||
key (usually Control-D).
|
||||
.PP
|
||||
The length of the message is limited to 20 lines.
|
||||
For every invocation of
|
||||
.I wall
|
||||
a notification will be written to syslog, with facility
|
||||
.B LOG_USER
|
||||
and level
|
||||
.BR LOG_INFO .
|
||||
|
||||
.SH OPTIONS
|
||||
.IP \fB\-n\fn
|
||||
Suppresses the normal banner printed by
|
||||
.IR wall ,
|
||||
changing it to "Remote broadcast message".
|
||||
This option is only available for root if
|
||||
.I wall
|
||||
is installed set-group-id, and is used by
|
||||
.IR rpc.walld (8).
|
||||
.PP
|
||||
|
||||
.SH ENVIRONMENT
|
||||
.I Wall
|
||||
ignores the
|
||||
.B TZ
|
||||
variable - the time printed in the banner is based on the system's
|
||||
local time.
|
||||
|
||||
.SH SEE ALSO
|
||||
.IR mesg (1),
|
||||
.IR rpc.rwalld (8).
|
||||
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
Reference in New Issue
Block a user