Merge branch '3.02'
This commit is contained in:
commit
1fa57a02fd
2
Makefile
2
Makefile
@ -3,6 +3,7 @@ VERSION=$(shell sed -rn '1s/.*[[:blank:]]\((.*)\)[[:blank:]].*/\1/p' doc/Changel
|
||||
|
||||
all install clean distclean:
|
||||
@rm -f $(PACKAGE)-$(VERSION).tar.xz $(PACKAGE)-$(VERSION).tar.xz.sig
|
||||
$(MAKE) VERSION=$(VERSION) -C man $@
|
||||
$(MAKE) VERSION=$(VERSION) -C src $@
|
||||
|
||||
GITLOGIN=$(shell git remote -v | head -n 1 | cut -f 1 -d '@' | sed 's/origin\t//g')
|
||||
@ -42,3 +43,4 @@ $(TMP)/$(PACKAGE)-$(VERSION): distclean
|
||||
@cp -R $(SOURCES) $(TMP)/$(PACKAGE)-$(VERSION)/
|
||||
@chmod -R a+r,u+w,og-w $@
|
||||
@find $@ -type d | xargs -r chmod a+rx,u+w,og-w
|
||||
|
||||
|
@ -1,3 +1,21 @@
|
||||
sysvinit (3.02) released; urgency=low
|
||||
* Added q and Q flags to synopsis in shutdown manual page.
|
||||
* Applied fixes for markup and spacing in manual pages.
|
||||
Patch provided by Mario Blattermann.
|
||||
* Added translation framework (po4a) from Mario Blttermann.
|
||||
* Added Makefile for man/ directory. Will handle translations
|
||||
and substitutions.
|
||||
* Applied new translations for multiple languages from Mario Blattermann.
|
||||
* Added ability to use "@" symbol in command named in the inittab file. This
|
||||
treats commands as literal and does not launch a shell to interpret them.
|
||||
* Updated inittab manual page to include overview of symbols which trigger
|
||||
a shell interpretor and how to disable them using the @ symbol.
|
||||
* Introduced change which adds error checking in bootlogd when performing
|
||||
chdir(). - Provided by Alexander Vickberg
|
||||
* Add check for console using TIOCGDEV on Linux systems in bootlogd to
|
||||
make finding console more robust. - Provided by Alexander Vickberg
|
||||
|
||||
|
||||
sysvinit (3.01) released; urgency=low
|
||||
* Default to showing processes in the uninterruptable state (D).
|
||||
The -z flag no longer affects whether processes in D state are shown.
|
||||
|
@ -28,6 +28,9 @@ SysV can be built on virtually any Linux system featuring
|
||||
the GNU C library or musl libc. A C compiler, such as the GNU Compiler
|
||||
Collection (GCC) or Clang is also required.
|
||||
|
||||
On systems which want to provide translated versions of manual pages
|
||||
the po4a package should be installed.
|
||||
|
||||
Here is a list of preferred directories to install the progs & manpages,
|
||||
this should be done for you automatically when you run "make install"
|
||||
as the root user, or via sudo, ie "sudo make install".
|
||||
|
@ -71,5 +71,4 @@ The sysvinit package includes
|
||||
|
||||
The new SysV init can be found on:
|
||||
|
||||
http://download.savannah.nongnu.org/releases/sysvinit/
|
||||
|
||||
https://github.com/slicer69/sysvinit
|
||||
|
13
man/Makefile
Normal file
13
man/Makefile
Normal file
@ -0,0 +1,13 @@
|
||||
MANPAGES=bootlogd.8 fstab-decode.8 halt.8 init.8 initctl.5 initscript.5 inittab.5 \
|
||||
killall5.8 last.1 lastb.1 logsave.8 mesg.1 mountpoint.1 pidof.8 poweroff.8 \
|
||||
readbootlog.1 reboot.8 runlevel.8 shutdown.8 sulogin.8 telinit.8 utmpdump.1 \
|
||||
wall.1
|
||||
|
||||
all install:
|
||||
sed --in-place=.orig --separate 's/\@VERSION\@/$(VERSION)/g' $(MANPAGES)
|
||||
|
||||
clean distclean:
|
||||
for man in $(MANPAGES) ; do \
|
||||
if [ -f "$$man.orig" ] ; then mv "$$man.orig" "$$man" ; fi \
|
||||
done
|
||||
|
@ -15,7 +15,7 @@
|
||||
.\" 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"
|
||||
.TH BOOTLOGD 8 "Jul 21, 2003" "sysvinit " "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
bootlogd \- record boot messages
|
||||
.SH SYNOPSIS
|
||||
@ -26,25 +26,24 @@ bootlogd \- record boot messages
|
||||
.RB [ \-r ]
|
||||
.RB [ \-s ]
|
||||
.RB [ \-v ]
|
||||
.RB [ " -l logfile " ]
|
||||
.RB [ " -p pidfile " ]
|
||||
.RI [ " \fB-l\fP logfile " ]
|
||||
.RI [ " \fB-p\fP 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,
|
||||
\fBbootlogd\fP runs in the background and copies all strings sent to the
|
||||
\fI/dev/console\fP device to a logfile. If the \fIlogfile\fP 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\-e\fP
|
||||
Print escape characters to the boot log file. This turns off filtering of
|
||||
escape characters and allows tools like GNU Less to see and use colour control
|
||||
characters (show the log in colour).
|
||||
escape characters and allows tools like GNU \fBless\fP(1) to see and use
|
||||
colour control characters (show the log in colour).
|
||||
.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.
|
||||
Without this option, \fBbootlogd\fP will wait for the logfile to appear before
|
||||
attempting to write to it. This behavior prevents \fBbootlogd\fP 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.
|
||||
@ -61,12 +60,12 @@ 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 NOTES
|
||||
bootlogd saves log data which includes control characters. The log is
|
||||
\fBbootlogd\fP saves log data which includes control characters. The log is
|
||||
technically a text file, but not very easy for humans to read. To address
|
||||
this the readbootlog(1) command can be used to display the boot log
|
||||
this the \fBreadbootlog\fP(1) command can be used to display the boot log
|
||||
without the control characters.
|
||||
.SH BUGS
|
||||
Bootlogd works by redirecting the console output from the console device.
|
||||
\fBbootlogd\fP 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
|
||||
@ -77,6 +76,10 @@ 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
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.SH "SEE ALSO"
|
||||
.BR dmesg (8), fdatasync (3), readbootlog(1).
|
||||
.BR dmesg (8),
|
||||
.BR fdatasync (3),
|
||||
.BR readbootlog (1)
|
||||
|
@ -17,7 +17,7 @@
|
||||
.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
.\"
|
||||
.\" Author: Miloslav Trmac <mitr@redhat.com>
|
||||
.TH fstab-decode 8 "May 2006"
|
||||
.TH FSTAB-DECODE 8 "May 2006" "sysvinit " "Linux System Administrator's Manual"
|
||||
|
||||
.SH NAME
|
||||
fstab-decode \- run a command with fstab-encoded arguments
|
||||
@ -30,11 +30,9 @@ fstab-decode \- run a command with fstab-encoded arguments
|
||||
decodes escapes (such as newline characters and other whitespace)
|
||||
in the specified \fIARGUMENT\fRs and uses them to run \fICOMMAND\fR.
|
||||
The argument escaping uses the same rules as path escaping in
|
||||
\fB/etc/fstab\fR,
|
||||
.B /etc/mtab
|
||||
and \fB/proc/mtab\fR.
|
||||
\fI/etc/fstab\fR, \fI/etc/mtab\fR and \fI/proc/mtab\fR.
|
||||
|
||||
In essence fstab-decode can be used anytime we want to pass multiple
|
||||
In essence \fBfstab-decode\fR can be used anytime we want to pass multiple
|
||||
parameters to a command as a list of command line arguments. It turns output
|
||||
like this:
|
||||
|
||||
@ -47,7 +45,7 @@ Into one long list of parameters, "/root /mnt/remote-disk /home". This
|
||||
can be useful when trying to work with multiple filesystems at once. For
|
||||
instance, we can use it to unmount multiple NFS shares. This program also
|
||||
removes whitespace and other characters which might cause programs such
|
||||
as mount or umount to fail.
|
||||
as \fBmount\fR(8) or \fBumount\fR(8) to fail.
|
||||
|
||||
.SH EXIT STATUS
|
||||
.B fstab-decode
|
||||
@ -57,13 +55,12 @@ can't be run.
|
||||
Otherwise it exits with the status returned by \fICOMMAND\fR.
|
||||
|
||||
.SH EXAMPLES
|
||||
The following example reads \fIfstab\fR, finds all instances of VFAT filesystems
|
||||
and prints their mount points (argument 2 in the \fIfstab\fR file).
|
||||
\fBfstab-decode\fR then runs the specified program, \fBumount\fR(8), and passes
|
||||
it the list of VFAT mountpoints. This unmounts all VFAT partitions.
|
||||
|
||||
.nf
|
||||
The following example reads fstab, finds all instances of VFAT filesystems and
|
||||
prints their mount points (argument 2 in the fstab file). fstab-decode then runs
|
||||
the specified program, umount, and passes it the list of VFAT mountpoints.
|
||||
This unmounts all VFAT partitions.
|
||||
|
||||
|
||||
.B fstab-decode umount $(awk \[aq]$3 == \[dq]vfat\[dq] { print $2 }\[aq] /etc/fstab)
|
||||
.fi
|
||||
|
||||
|
20
man/halt.8
20
man/halt.8
@ -17,11 +17,11 @@
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH HALT 8 "Nov 6, 2001" "" "Linux System Administrator's Manual"
|
||||
.TH HALT 8 "Nov 6, 2001" "sysvinit " "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
halt, reboot, poweroff \- stop the system.
|
||||
halt, reboot, poweroff \- stop the system
|
||||
.\"}}}
|
||||
.\"{{{ Synopsis
|
||||
.SH SYNOPSIS
|
||||
@ -61,7 +61,7 @@ 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
|
||||
The rest of this manpage describes the behavior in runlevels 0
|
||||
and 6, that is when the systems shutdown scripts are being run.
|
||||
.\"}}}
|
||||
.\"{{{ Options
|
||||
@ -77,13 +77,13 @@ Don't write the wtmp record.
|
||||
.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.
|
||||
Shut down all network interfaces just before \fBhalt\fR or \fBreboot\fR.
|
||||
Warning: This may not work on interfaces which do not have an IP address
|
||||
and should ideally be handled by a network manager service.
|
||||
.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
|
||||
When halting the system, switch off the power. This is the default when \fBhalt\fR is
|
||||
called as \fBpoweroff\fP.
|
||||
.\"}}}
|
||||
.\"{{{ Diagnostics
|
||||
@ -92,12 +92,12 @@ 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
|
||||
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 and /var/run/runlevel does not exist) \fBshutdown\fP will be called,
|
||||
correctly and \fI/var/run/runlevel\fR does not exist) \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
|
||||
@ -107,14 +107,16 @@ 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,
|
||||
The \fBhalt\fP program uses \fI/proc/ide/hd*\fR 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
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
|
104
man/init.8
104
man/init.8
@ -17,7 +17,7 @@
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH INIT 8 "29 Jul 2004" "" "Linux System Administrator's Manual"
|
||||
.TH INIT 8 "29 Jul 2004" "sysvinit " "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
@ -46,19 +46,19 @@ init, telinit \- process control initialization
|
||||
.SH DESCRIPTION
|
||||
.\"{{{ init
|
||||
.SS Init
|
||||
.B 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
|
||||
from a script stored in the file \fI/etc/inittab\fR (see
|
||||
\fBinittab\fR(5)). This file usually has entries which cause \fBinit\fR
|
||||
to spawn \fBgetty\fRs 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
|
||||
A \fIrunlevel\fR 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:
|
||||
\fBinit\fR for each of these runlevels are defined in the
|
||||
\fI/etc/inittab\fR file. \fBinit\fR can be in one of eight runlevels:
|
||||
\fB0\(en6\fP and \fBS\fP (a.k.a. \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
|
||||
@ -92,16 +92,16 @@ 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
|
||||
it looks for the file \fI/etc/inittab\fP to see if there is an entry of the
|
||||
type \fBinitdefault\fP (see \fBinittab\fR(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
|
||||
entry (or no \fI/etc/inittab\fR at all), a runlevel must be
|
||||
entered at the system console.
|
||||
.PP
|
||||
Runlevel \fBS\fP or \fBs\fP initialize the system
|
||||
and do not require an \fB/etc/inittab\fP file.
|
||||
and do not require an \fI/etc/inittab\fP file.
|
||||
.PP
|
||||
In single user mode, \fB/sbin/sulogin\fP is invoked on \fB/dev/console\fP.
|
||||
In single user mode, \fB/sbin/sulogin\fP is invoked on \fI/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
|
||||
@ -117,21 +117,21 @@ When starting a new process, \fBinit\fP first checks whether the file
|
||||
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,
|
||||
it died in \fI/var/run/utmp\fP and \fI/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
|
||||
the \fI/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 (reload) the
|
||||
\fB/etc/inittab\fP file.
|
||||
\fI/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
|
||||
signal (SIGPWR), it reads the file \fI/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
|
||||
@ -142,19 +142,19 @@ The power has been restored, execute the \fBpowerokwait\fP entries.
|
||||
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
|
||||
If \fI/etc/powerstatus\fR doesn't exist or contains anything else then the
|
||||
letters \fBF\fP, \fBO\fP or \fBL\fP, \fBinit\fR 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/run/initctl\fP
|
||||
control channel - see the initctl manual page for more documentation
|
||||
Usage of \fBSIGPWR\fP and \fI/etc/powerstatus\fP is discouraged. Someone
|
||||
wanting to interact with \fBinit\fP should use the \fI/run/initctl\fP
|
||||
control channel - see the \fBinitctl\fR(5) manual page 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
|
||||
warning signal \fBSIGTERM\fP to all processes that are undefined
|
||||
in the new runlevel. It then waits 3 seconds before forcibly
|
||||
terminating these processes via the \s-1\fBSIGKILL\fP\s0 signal.
|
||||
terminating these processes via the \fBSIGKILL\fP 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
|
||||
@ -167,23 +167,23 @@ be terminated separately.
|
||||
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"
|
||||
.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
|
||||
.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.
|
||||
tell \fBinit\fP to re-examine the \fI/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. Runlevel should be one of
|
||||
\fI/etc/inittab\fP file happens. Runlevel 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
|
||||
between sending processes the \fBSIGTERM\fR and \fBSIGKILL\fR signals. The default
|
||||
is 3 seconds, but this can be changed with the \fB-t\fP option.
|
||||
.PP
|
||||
\fBtelinit -e\fP tells \fBinit\fP to change the environment
|
||||
@ -215,10 +215,10 @@ The current system runlevel.
|
||||
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.
|
||||
if it is not set \fBinit\fP will set it to \fI/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 or GRUB). \fBInit\fP accepts the following flags:
|
||||
boot monitor (eg. LILO or GRUB). \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
|
||||
@ -240,26 +240,26 @@ 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
|
||||
measures - of course the user could specify "auto" or \fB-a\fR 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
|
||||
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
|
||||
.TP 0.5i
|
||||
.B \-\-version
|
||||
This argument, when used on its own, displays the current version of init
|
||||
to the console/stdout. It is a quick way to determine which init software and
|
||||
version is being used. After the version information is displayed, init
|
||||
This argument, when used on its own, displays the current version of \fBinit\fP
|
||||
to the console/stdout. It is a quick way to determine which \fBinit\fP software and
|
||||
version is being used. After the version information is displayed, \fBinit\fP
|
||||
immediately exits with a return code of zero.
|
||||
.PP
|
||||
.SH INTERFACE
|
||||
Init listens on a \fIfifo\fP in /dev, \fI/run/initctl\fP, for messages.
|
||||
\fBTelinit\fP uses this to communicate with init. The interface is not
|
||||
\fBinit\fP listens on a \fIfifo\fP in /dev, \fI/run/initctl\fP, for messages.
|
||||
\fBTelinit\fP uses this to communicate with \fBinit\fP. 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.
|
||||
@ -271,18 +271,18 @@ 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/run/initctl\fP. Useful for bootscripts when /dev is remounted.
|
||||
On receipt of this signals, \fBinit\fP closes and re-opens its control fifo,
|
||||
\fB/run/initctl\fP. Useful for bootscripts when \fI/dev\fP is remounted.
|
||||
.TP 0.5i
|
||||
.B SIGUSR2
|
||||
When init receives SIGUSR2, init closes and leaves the control fifo,
|
||||
\fB/run/initctl\fP, closed. This may be used to make sure init is not
|
||||
holding open any files. However, it also prevents init from switching
|
||||
When \fBinit\fP receives \fBSIGUSR2\fR, \fBinit\fP closes and leaves the control fifo,
|
||||
\fB/run/initctl\fP, closed. This may be used to make sure \fBinit\fP is not
|
||||
holding open any files. However, it also prevents \fBinit\fP from switching
|
||||
runlevels. Which means commands like shutdown no longer work.
|
||||
The fifo can be re-opened by sending init the SIGUSR1 signal.
|
||||
The fifo can be re-opened by sending \fBinit\fP the \fBSIGUSR1\fR signal.
|
||||
.TP 0.5i
|
||||
.B SIGINT
|
||||
Normally the kernel sends this signal to init when CTRL-ALT-DEL is
|
||||
Normally the kernel sends this signal to \fBinit\fP when CTRL-ALT-DEL is
|
||||
pressed. It activates the \fIctrlaltdel\fP action.
|
||||
.TP 0.5i
|
||||
.B SIGWINCH
|
||||
@ -290,7 +290,7 @@ 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
|
||||
\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
|
||||
@ -309,7 +309,7 @@ file in the directory \fI/etc/init.d\fP explaining how these scripts work.
|
||||
.\"}}}
|
||||
.\"{{{ Warnings
|
||||
.SH WARNINGS
|
||||
\fBInit\fP assumes that processes and descendants of processes
|
||||
\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
|
||||
@ -330,13 +330,17 @@ 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
|
||||
when someone makes a typographical error in the \fI/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).
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME , initial manual page by
|
||||
.MT u31b3hs@\:pool\:.informatik\:.rwth-aachen\:.de
|
||||
Michael Haardt
|
||||
.ME .
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
|
@ -14,23 +14,23 @@
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH INITCTL 5 "April 13, 2018" "" "Linux System Administrator's Manual"
|
||||
.TH INITCTL 5 "April 13, 2018" "sysvinit " "File Formats"
|
||||
.SH NAME
|
||||
initctl \- /run/initctl is a named pipe which passes commands to SysV init.
|
||||
initctl \- /run/initctl is a named pipe which passes commands to SysV init
|
||||
.SH SYNOPSIS
|
||||
/run/initctl
|
||||
.SH DESCRIPTION
|
||||
|
||||
This document describes the communiction pipe set up by SysV init
|
||||
at /run/initctl. This named pipe allows programs with the proper
|
||||
This document describes the communication pipe set up by SysV \fBinit\fR
|
||||
at \fI/run/initctl\fR. This named pipe allows programs with the proper
|
||||
permissions (typically programs run by root have read+write access to
|
||||
the pipe) to send signals to the init program (PID 1).
|
||||
the pipe) to send signals to the \fBinit\fR program (PID 1).
|
||||
|
||||
The init manual page has, up until recently, simply stated
|
||||
that people wishing to understand how to send messages to init
|
||||
The \fBinit\fR manual page has, up until recently, simply stated
|
||||
that people wishing to understand how to send messages to \fBinit\fR
|
||||
should read the init program's source code, but that is not usually practical.
|
||||
|
||||
Messages sent to the pipe to talk to init must have a special format.
|
||||
Messages sent to the pipe to talk to \fBinit\fR must have a special format.
|
||||
This format is defined as a C structure and the technical break-down
|
||||
is presented here:
|
||||
|
||||
@ -56,10 +56,10 @@ struct init_request {
|
||||
|
||||
Let's go through the init_request structure one line at a time. The
|
||||
first variable, the "magic" number must be of the value 0x03091969.
|
||||
The init program then knows that only programs with root access which send
|
||||
The \fBinit\fR program then knows that only programs with root access which send
|
||||
this magic number are authorized to communicate with init.
|
||||
|
||||
The cmd variable is a value in the range of 0-8 (currently). This cmd
|
||||
The \fIcmd\fR variable is a value in the range of 0-8 (currently). This \fIcmd\fR
|
||||
variable tells init what we want it to do. Here are the possible options:
|
||||
|
||||
1 - Set the current runlevel, specified by the runlevel variable.
|
||||
@ -71,31 +71,31 @@ variable tells init what we want it to do. Here are the possible options:
|
||||
4 - The power is okay, cancel shutdown.
|
||||
|
||||
6 - Set an environment variable to a value to be specified in
|
||||
the data variable of this structure.
|
||||
the \fIdata\fR variable of this structure.
|
||||
|
||||
Other cmd options may be added to init later. For example, command values
|
||||
Other \fIcmd\fR options may be added to \fBinit\fR later. For example, command values
|
||||
0, 5 and 7 are defined but currently not implemented.
|
||||
|
||||
The runlevel variable will specify the runlevel to switch to (0-6).
|
||||
The \fIrunlevel\fR variable will specify the runlevel to switch to (0-6).
|
||||
|
||||
The sleeptime variable is to be used when we want to tell init to change
|
||||
the time spent waiting between sending SIGTERM and SIGKILL during the
|
||||
The \fIsleeptime\fR variable is to be used when we want to tell \fBinit\fR to change
|
||||
the time spent waiting between sending \fBSIGTERM\fR and \fBSIGKILL\fR during the
|
||||
shutdown process. Changing this at run time is not yet implemented.
|
||||
|
||||
The data variable (in the union) can be used to pass misc data which init
|
||||
The \fIdata\fR variable (in the union) can be used to pass misc data which init
|
||||
might need to process our request. For example, when setting environment
|
||||
variables.
|
||||
|
||||
When setting an environment variable through init's /run/initctl pipe,
|
||||
the data variable should have the format VARIABLE=VALUE. The string
|
||||
When setting an environment variable through \fBinit\fR's \fI/run/initctl\fR pipe,
|
||||
the data variable should have the format \fIVARIABLE\fR=\fIVALUE\fR. The string
|
||||
should be terminated with a NULL character.
|
||||
|
||||
.SH EXAMPLES
|
||||
|
||||
The following C code example shows how to send a set environment variable
|
||||
request to the init process using the /run/initctl pipe. This example
|
||||
is simplified and skips the error checking. A more comlpete example can be
|
||||
found in the shutdown.c program's init_setnv() function.
|
||||
request to the \fBinit\fR process using the \fI/run/initctl\fR pipe. This example
|
||||
is simplified and skips the error checking. A more complete example can be
|
||||
found in the shutdown.c program's \fBinit_setnv\fR() function.
|
||||
|
||||
.nf
|
||||
struct init_request request; /* structure defined above */
|
||||
@ -117,32 +117,36 @@ if ((fd = open(INIT_FIFO, O_WRONLY)) >= 0) /* open pipe for writing */
|
||||
|
||||
.sp
|
||||
.SH NOTES
|
||||
Usually the /run/initctl pipe would only be used by low-level programs to
|
||||
request a power-related shutdown or change the runlevel, like telinit
|
||||
would do. Most of the time there is no need to talk to init directly, but
|
||||
this gives us an extenable approach so init can be taught how to learn
|
||||
Usually the \fI/run/initctl\fR pipe would only be used by low-level programs to
|
||||
request a power-related shutdown or change the runlevel, like \fBtelinit\fR
|
||||
would do. Most of the time there is no need to talk to \fBinit\fR directly, but
|
||||
this gives us an extendable approach so \fBinit\fR can be taught how to learn
|
||||
more commands.
|
||||
.PP
|
||||
The commands passed through the /run/initctl pipe must be sent in a specific
|
||||
The commands passed through the \fI/run/initctl\fR pipe must be sent in a specific
|
||||
binary format and be of a specific length. Larger data structures or ones
|
||||
not using the proper format will be ignored. Typically, only root has the
|
||||
ability to write to the initctl pipe for security reasons.
|
||||
.PP
|
||||
The /run/initctl pipe can be closed by sending init (PID 1) the SIGUSR2
|
||||
The \fI/run/initctl\fR pipe can be closed by sending init (PID 1) the \fBSIGUSR2\fR
|
||||
signal. This closes the pipe and leaves it closed. This may be useful
|
||||
for making sure init is not keeping any files open. However, when the
|
||||
pipe is closed, init no longer receives signals, such as those sent by
|
||||
shutdown or telinit. In other words if we close the pipe, init cannot
|
||||
change its runlevel directly. The pipe may be re-opened by sending init (PID 1)
|
||||
the SIGUSR1 signal.
|
||||
for making sure \fBinit\fR is not keeping any files open. However, when the
|
||||
pipe is closed, \fBinit\fR no longer receives signals, such as those sent by
|
||||
\fBshutdown\fR(8) or \fBtelinit\fR(8). In other words if we close the pipe, \fBinit\fR cannot
|
||||
change its runlevel directly. The pipe may be re-opened by sending \fBinit\fR (PID 1)
|
||||
the \fBSIGUSR1\fR signal.
|
||||
.PP
|
||||
If the /run/initctl pipe is closed then it may still be possible to bring
|
||||
down the system using the shutdown command's -n flag, but this is not
|
||||
If the \fI/run/initctl\fR pipe is closed then it may still be possible to bring
|
||||
down the system using the \fBshutdown\fR(8) command's \fB-n\fR flag, but this is not
|
||||
always clean and not recommended.
|
||||
|
||||
.SH FILES
|
||||
/run/initctl
|
||||
/sbin/init
|
||||
|
||||
.SH AUTHOR
|
||||
Jesse Smith <jsmith@resonatingmedia.com>
|
||||
.MT jsmith@\:resonatingmedia\:.com
|
||||
Jesse Smith
|
||||
.ME
|
||||
.SH "SEE ALSO"
|
||||
init(8)
|
||||
.BR init (8)
|
||||
|
@ -15,16 +15,16 @@
|
||||
.\" 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"
|
||||
.TH INITSCRIPT 5 "July 10, 2003" "sysvinit " "File Formats"
|
||||
.SH NAME
|
||||
initscript \- script that executes inittab commands.
|
||||
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.
|
||||
This script can be used to set things like \fIulimit\fP and
|
||||
\fIumask\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.
|
||||
@ -66,6 +66,9 @@ with this can make your system un(re)bootable.
|
||||
/etc/inittab,
|
||||
/etc/initscript.
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg ,<miquels@cistron.nl>
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.SH "SEE ALSO"
|
||||
inittab(5), init(8).
|
||||
.BR inittab (5),
|
||||
.BR init (8)
|
||||
|
@ -17,7 +17,7 @@
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH INITTAB 5 "Dec 4, 2001" "" "Linux System Administrator's Manual"
|
||||
.TH INITTAB 5 "Dec 4, 2001" "sysvinit " "File Formats"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
@ -28,7 +28,7 @@ process
|
||||
.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)
|
||||
.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
|
||||
@ -67,6 +67,26 @@ a `+' character,
|
||||
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. The length of this field is limited to 127 characters.
|
||||
|
||||
Please note that including certain characters in the process field will result
|
||||
in
|
||||
.B init
|
||||
attempting to launch a shell to interpret the command contained in the process field.
|
||||
The characters which will trigger a shell are:
|
||||
.B ~`!$^&*()=|\{}[];\"'<>?
|
||||
|
||||
On systems which do not have a shell to be launched or which do not wish to
|
||||
use a shell to interpret the process field, the process field can be prefixed
|
||||
with the @ symbol. The @ will be ignored and everything followed will be treated
|
||||
as a command to be launched, literally, by the
|
||||
.B init
|
||||
service.
|
||||
|
||||
In cases where both a + and @ sign are to be used (to turn off logging and shell
|
||||
interpretation), place the + sign before the @ symbol. Both flags will be handled
|
||||
and then everything following the @ will be handled by
|
||||
.B init
|
||||
|
||||
.\"}}}
|
||||
.PP
|
||||
The \fIrunlevels\fP field may contain multiple characters for different
|
||||
@ -134,9 +154,9 @@ The \fIrunlevels\fP field is ignored.
|
||||
.\"}}}
|
||||
.\"{{{ powerwait
|
||||
.IP \fBpowerwait\fP
|
||||
The process will be executed when the power goes down. Init is usually
|
||||
The process will be executed when the power goes down. \fBinit\fR 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.
|
||||
\fBinit\fP will wait for the process to finish before continuing.
|
||||
.\"}}}
|
||||
.\"{{{ powerfail
|
||||
.IP \fBpowerfail\fP
|
||||
@ -156,7 +176,7 @@ 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.
|
||||
The process will be executed when \fBinit\fP receives the \fBSIGINT\fP 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
|
||||
@ -197,7 +217,7 @@ rc::bootwait:/etc/rc
|
||||
.fi
|
||||
.sp
|
||||
.RE
|
||||
This inittab file executes \fB/etc/rc\fP during boot and starts gettys
|
||||
This inittab file executes \fI/etc/rc\fP during boot and starts gettys
|
||||
on tty1\-tty4.
|
||||
.PP
|
||||
A more elaborate \fBinittab\fP with different runlevels (see the comments
|
||||
@ -253,10 +273,18 @@ S1:3:respawn:/sbin/mgetty -x0 -D ttyS1
|
||||
.\"}}}
|
||||
.\"{{{ 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).
|
||||
\fBinit\fP was written by
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME .
|
||||
This manual page was written by
|
||||
.MT lederer@\:francium\:.informatik\:.uni-bonn\:.de
|
||||
Sebastian Lederer
|
||||
.ME
|
||||
and modified by
|
||||
.MT u31b3hs@\:pool\:.informatik\:.rwth-aachen\:.de
|
||||
Michael Haardt
|
||||
.ME .
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
|
@ -15,9 +15,9 @@
|
||||
.\" 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"
|
||||
.TH KILLALL5 8 "04 Nov 2003" "sysvinit " "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
killall5 -- send a signal to all processes.
|
||||
killall5 - send a signal to all processes
|
||||
.SH SYNOPSIS
|
||||
.B killall5
|
||||
.B \-signalnumber
|
||||
@ -27,23 +27,25 @@ killall5 -- send a signal to all processes.
|
||||
.IR omitpid [, omitpid ...]...]
|
||||
.SH DESCRIPTION
|
||||
.B killall5
|
||||
is the SystemV killall command. It sends a signal to all processes except
|
||||
is the SystemV \fBkillall\fR 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.
|
||||
(only) use is in the \fBrc\fP scripts found in the \fI/etc/init.d\fP directory.
|
||||
.SH OPTIONS
|
||||
.IP "-o \fIomitpid\fP"
|
||||
Tells \fIkillall5\fP to omit processes with that process id.
|
||||
.IP "\fB-o\fP \fIomitpid\fP"
|
||||
Tells \fBkillall5\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.
|
||||
\fBkillall5\fP can also be invoked as \fBpidof\fP(8), which is simply a
|
||||
(symbolic) link to the \fBkillall5\fP program.
|
||||
.SH EXIT STATUS
|
||||
The program return zero if it killed processes. It return 2 if no
|
||||
The program return zero if it killed processes. It returns 2 if no
|
||||
process were killed, and 1 if it was unable to find any processes
|
||||
(/proc/ is missing).
|
||||
(\fI/proc/\fP is missing).
|
||||
.SH SEE ALSO
|
||||
.BR halt (8),
|
||||
.BR reboot (8),
|
||||
.BR pidof (8)
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
|
18
man/last.1
18
man/last.1
@ -17,7 +17,7 @@
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH LAST,LASTB 1 "Jul 31, 2004" "" "Linux System Administrator's Manual"
|
||||
.TH LAST, LASTB 1 "Jul 31, 2004" "sysvinit " "User Commands"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
@ -54,22 +54,22 @@ 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,
|
||||
When \fBlast\fP catches a \fBSIGINT\fP signal (generated by the interrupt key,
|
||||
usually control-C) or a \fBSIGQUIT\fP 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.
|
||||
file; in the case of the \fBSIGINT\fP 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
|
||||
\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.
|
||||
Tells \fBlast\fP to use a specific file instead of \fI/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"
|
||||
@ -109,7 +109,7 @@ 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).
|
||||
\fBtouch /var/log/wtmp\fP).
|
||||
.\"{{{ Files
|
||||
.SH FILES
|
||||
/var/log/wtmp
|
||||
@ -118,7 +118,9 @@ created with a simple \fBtouch\fP(1) command (for example,
|
||||
.\"}}}
|
||||
.\"{{{ Author
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
|
@ -2,7 +2,7 @@
|
||||
.\" Copyright 2003 by Theodore Ts'o. All Rights Reserved.
|
||||
.\" This file may be copied under the terms of the GNU Public License.
|
||||
.\"
|
||||
.TH LOGSAVE 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
|
||||
.TH LOGSAVE 8 "" "sysvinit " "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
logsave \- save the output of a command in a logfile
|
||||
.SH SYNOPSIS
|
||||
@ -30,12 +30,12 @@ If
|
||||
is a single hyphen ('-'), then instead of executing a program,
|
||||
.B logsave
|
||||
will take its input from standard input and save it in
|
||||
.I logfile
|
||||
.IR logfile .
|
||||
.PP
|
||||
.B logsave
|
||||
is useful for saving the output of initial boot scripts
|
||||
until the /var partition is mounted, so the output can be written to
|
||||
/var/log.
|
||||
until the \fI/var\fP partition is mounted, so the output can be written to
|
||||
\fI/var/log\fP.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B \-a
|
||||
@ -56,6 +56,8 @@ This option will make
|
||||
.B logsave
|
||||
to be more verbose in its output to the user.
|
||||
.SH AUTHOR
|
||||
Theodore Ts'o (tytso@mit.edu)
|
||||
.MT tytso@mit\:.edu
|
||||
Theodore Ts'o
|
||||
.ME
|
||||
.SH SEE ALSO
|
||||
.BR fsck (8)
|
||||
|
10
man/mesg.1
10
man/mesg.1
@ -17,7 +17,7 @@
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH MESG 1 "Feb 26, 2001" "" "Linux User's Manual"
|
||||
.TH MESG 1 "Feb 26, 2001" "sysvinit " "User Commands"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
@ -30,7 +30,7 @@ mesg \- control write access to your terminal
|
||||
.\"}}}
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
.B Mesg
|
||||
.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)).
|
||||
.\"}}}
|
||||
@ -46,12 +46,14 @@ terminal.
|
||||
.\"}}}
|
||||
.\"{{{ Notes
|
||||
.SH NOTES
|
||||
\fBMesg\fP assumes that its standard input is connected to your
|
||||
\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)
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
|
@ -15,20 +15,20 @@
|
||||
.\" 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"
|
||||
.TH MOUNTPOINT 1 "Mar 15, 2004" "sysvinit " "User Commands"
|
||||
.SH NAME
|
||||
mountpoint \- see if a directory is a mountpoint
|
||||
.SH SYNOPSIS
|
||||
.B /bin/mountpoint
|
||||
.B mountpoint
|
||||
.RB [ \-q ]
|
||||
.RB [ \-d ]
|
||||
.I /path/to/directory
|
||||
.br
|
||||
.B /bin/mountpoint
|
||||
.B mountpoint
|
||||
.B \-x
|
||||
.I /dev/device
|
||||
.SH DESCRIPTION
|
||||
\fBMountpoint\fP checks if the directory is a mountpoint.
|
||||
\fBmountpoint\fP checks if the directory is a mountpoint.
|
||||
|
||||
.SH OPTIONS
|
||||
.IP \fB\-q\fP
|
||||
@ -36,7 +36,7 @@ Be quiet - don't print anything.
|
||||
.IP \fB\-d\fP
|
||||
Print major/minor device number of the filesystem on stdout.
|
||||
.IP \fB\-p\fP
|
||||
Check Linux's /proc/mounts file to try to detect circular mount points.
|
||||
Check Linux's \fI/proc/mounts\fP file to try to detect circular mount points.
|
||||
.IP \fB\-x\fP
|
||||
Print major/minor device number of the blockdevice on stdout.
|
||||
.SH EXIT STATUS
|
||||
@ -46,7 +46,7 @@ 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,
|
||||
The name of the command is misleading when the \fB-x\fP 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
|
||||
@ -56,14 +56,16 @@ For example, if /a/b/c/d is a mount point for /a/b then mountpoint will report
|
||||
its new mount point share the same inode and device number.
|
||||
.PP
|
||||
The circular mount problem can be worked around on Linux systems by using
|
||||
the -p flag to check the /proc/mounts file for references to the circular mount bind.
|
||||
When using the -p flag, make sure to specify the full path (ie /home/user/mp and
|
||||
not just mp). Also, mountpoint may still fail if there are spaces in
|
||||
the mount point's path, even when using the -p flag because of the way
|
||||
/proc/mounts mangles the spaces in the path name. Of course, if the
|
||||
the\fB-p\fP flag to check the \fI/proc/mounts\fP file for references to the circular mount bind.
|
||||
When using the \fB-p\fP flag, make sure to specify the full path (ie \fI/home/user/mp\fP and
|
||||
not just \fImp\fP). Also, \fBmountpoint\fP may still fail if there are spaces in
|
||||
the mount point's path, even when using the \fB-p\fP flag because of the way
|
||||
\fB/proc/mounts\fP mangles the spaces in the path name. Of course, if the
|
||||
admin is using circular mount points with spaces in the name, there
|
||||
are bigger concerns.
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.SH "SEE ALSO"
|
||||
.BR stat (1)
|
||||
|
46
man/pidof.8
46
man/pidof.8
@ -15,9 +15,9 @@
|
||||
.\" 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"
|
||||
.TH PIDOF 8 "01 Sep 1998" "sysvinit " "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
pidof -- find the process ID of a running program.
|
||||
pidof - find the process ID of a running program
|
||||
.SH SYNOPSIS
|
||||
.B pidof
|
||||
.RB [ \-s ]
|
||||
@ -31,26 +31,24 @@ pidof -- find the process ID of a running program.
|
||||
.IR omitpid[,omitpid...]... ]
|
||||
.RB [ \-d
|
||||
.IR sep ]
|
||||
.B program
|
||||
.RB [ program... ]
|
||||
.I program
|
||||
.RI [ program... ]
|
||||
.SH DESCRIPTION
|
||||
.B Pidof
|
||||
.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.
|
||||
located in \fI/etc/rc?.d\fP, where ? is the runlevel. If the system has
|
||||
a \fBstart-stop-daemon\fP(8) program that should be used instead.
|
||||
.SH OPTIONS
|
||||
.IP \-s
|
||||
.IP \fB\-s\fP
|
||||
Single shot - this instructs the program to only return one \fIpid\fP.
|
||||
.IP \-c
|
||||
.IP \fB\-c\fP
|
||||
Only return process PIDs 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 \-n
|
||||
.IP \fB\-n\fP
|
||||
Avoid
|
||||
.BR stat (2)
|
||||
system function call on all binaries which are located on network
|
||||
@ -59,25 +57,25 @@ based file systems like
|
||||
Instead of using this option the variable
|
||||
.B PIDOF_NETFS
|
||||
may be set and exported.
|
||||
.IP \-q
|
||||
.IP \fB\-q\fP
|
||||
Do not display matched PIDs to standard out. Simply exit with
|
||||
a status of true or false to indicate whether a matching PID was found.
|
||||
.IP \-x
|
||||
.IP \fB\-x\fP
|
||||
Scripts too - this causes the program to also return process id's of
|
||||
shells running the named scripts.
|
||||
.IP \-z
|
||||
.IP \fB\-z\fP
|
||||
Try to detect processes which are stuck in zombie (Z)
|
||||
status. Usually these processes are skipped as trying to deal with them can cause
|
||||
pidof or related tools to hang. Note: In the past pidof would ignore processes
|
||||
in the uninterruptable state (D), unless the \-z flag was specified. This is no
|
||||
longer the case. The pidof program will find and report processes in the D state
|
||||
whether \-z is specified or not.
|
||||
in the uninterruptable state (D), unless the \fB-z\fP flag was specified. This is no
|
||||
longer the case. The \fBpidof\fP program will find and report processes in the D state
|
||||
whether \fB-z\fP is specified or not.
|
||||
.IP "-d \fIsep\fP"
|
||||
Tells \fIpidof\fP to use \fIsep\fP as an output separator if more than one PID
|
||||
is shown. The default separator is a space.
|
||||
.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
|
||||
pid \fB%PPID\fP can be used to name the parent process of the \fBpidof\fP
|
||||
program, in other words the calling shell or shell script.
|
||||
.SH "EXIT STATUS"
|
||||
.TP
|
||||
@ -87,10 +85,10 @@ At least one program was found with the requested name.
|
||||
.B 1
|
||||
No program was found with the requested name.
|
||||
.SH NOTES
|
||||
\fIpidof\fP is actually the same program as \fIkillall5\fP;
|
||||
\fIpidof\fP is actually the same program as \fBkillall5\fP(8);
|
||||
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
|
||||
When \fBpidof\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. Note
|
||||
@ -100,7 +98,7 @@ so symbolic links to executables will also match.
|
||||
.PP
|
||||
Zombie processes or processes in disk sleep (states Z and D, respectively)
|
||||
are ignored, as attempts to access the stats of these will sometimes fail.
|
||||
The \-z flag (see above) tells pidof to try to detect these sleeping and zombie
|
||||
The \fB\-z\fP flag (see above) tells \fBpidof\fP to try to detect these sleeping and zombie
|
||||
processes, at the risk of failing or hanging.
|
||||
|
||||
.SH SEE ALSO
|
||||
@ -110,4 +108,6 @@ processes, at the risk of failing or hanging.
|
||||
.BR reboot (8),
|
||||
.BR killall5 (8)
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
|
6008
man/po/de.po
Normal file
6008
man/po/de.po
Normal file
File diff suppressed because it is too large
Load Diff
4898
man/po/es.po
Normal file
4898
man/po/es.po
Normal file
File diff suppressed because it is too large
Load Diff
3986
man/po/fi.po
Normal file
3986
man/po/fi.po
Normal file
File diff suppressed because it is too large
Load Diff
6343
man/po/fr.po
Normal file
6343
man/po/fr.po
Normal file
File diff suppressed because it is too large
Load Diff
4264
man/po/hu.po
Normal file
4264
man/po/hu.po
Normal file
File diff suppressed because it is too large
Load Diff
3858
man/po/id.po
Normal file
3858
man/po/id.po
Normal file
File diff suppressed because it is too large
Load Diff
5360
man/po/pl.po
Normal file
5360
man/po/pl.po
Normal file
File diff suppressed because it is too large
Load Diff
22
man/po/po4a.cfg
Normal file
22
man/po/po4a.cfg
Normal file
@ -0,0 +1,22 @@
|
||||
[po4a_langs] de es fi fr hu id pl
|
||||
[po4a_paths] sysvinit-man.pot $lang:$lang.po
|
||||
|
||||
[type:man] ../bootlogd.8 $lang:$lang/bootlogd.8
|
||||
[type:man] ../fstab-decode.8 $lang:$lang/fstab-decode.8
|
||||
[type:man] ../halt.8 $lang:$lang/halt.8
|
||||
[type:man] ../init.8 $lang:$lang/init.8
|
||||
[type:man] ../initctl.5 $lang:$lang/initctl.5
|
||||
[type:man] ../initscript.5 $lang:$lang/initscript.5
|
||||
[type:man] ../inittab.5 $lang:$lang/inittab.5
|
||||
[type:man] ../killall5.8 $lang:$lang/killall5.8
|
||||
[type:man] ../last.1 $lang:$lang/last.1
|
||||
[type:man] ../logsave.8 $lang:$lang/logsave.8
|
||||
[type:man] ../mesg.1 $lang:$lang/mesg.1
|
||||
[type:man] ../mountpoint.1 $lang:$lang/mountpoint.1
|
||||
[type:man] ../pidof.8 $lang:$lang/pidof.8
|
||||
[type:man] ../readbootlog.1 $lang:$lang/readbootlog.1
|
||||
[type:man] ../runlevel.8 $lang:$lang/runlevel.8
|
||||
[type:man] ../shutdown.8 $lang:$lang/shutdown.8
|
||||
[type:man] ../sulogin.8 $lang:$lang/sulogin.8
|
||||
[type:man] ../utmpdump.1 $lang:$lang/utmpdump.1
|
||||
[type:man] ../wall.1 $lang:$lang/wall.1
|
3722
man/po/sysvinit-man.pot
Normal file
3722
man/po/sysvinit-man.pot
Normal file
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH READBOOTLOG 1 "NOV 12, 2018" "" "Linux System Administrator's Manual"
|
||||
.TH READBOOTLOG 1 "NOV 12, 2018" "sysvinit " "User Commands"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
@ -33,7 +33,7 @@ readbootlog \- show contents of the boot log, stripping away control characters
|
||||
.\"{{{ Description
|
||||
.SH DESCRIPTION
|
||||
.B readbootlog
|
||||
is a tool for reading the boot log (by default /var/log/boot). The program
|
||||
is a tool for reading the boot log (by default \fI/var/log/boot\fP). The program
|
||||
strips away control characters and non-human readable contents from the log
|
||||
file. Output is dumped to the terminal where it can be piped or redirected
|
||||
to a file.
|
||||
@ -41,7 +41,7 @@ to a file.
|
||||
.\"{{{ Options
|
||||
.SH OPTIONS
|
||||
.IP "\fB\-f\fP \fIfile\fP"
|
||||
Tells \fBreadbootlog\fP to use a specific file instead of \fB/var/log/boot\fP.
|
||||
Tells \fBreadbootlog\fP to use a specific file instead of \fI/var/log/boot\fP.
|
||||
.IP \fB\-h\fP
|
||||
Displays a brief help message.
|
||||
.\"{{{ Files
|
||||
@ -50,7 +50,9 @@ Displays a brief help message.
|
||||
.\"}}}
|
||||
.\"{{{ Author
|
||||
.SH AUTHOR
|
||||
Jesse Smith <jsmith@resonatingmedia.com>
|
||||
.MT jsmith@\:resonatingmedia\:.com
|
||||
Jesse Smith
|
||||
.ME
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
|
@ -15,14 +15,14 @@
|
||||
.\" 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"
|
||||
.TH RUNLEVEL 8 "May 27, 1997" "sysvinit " "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
runlevel -- find the previous and current system runlevel.
|
||||
runlevel - find the previous and current system runlevel
|
||||
.SH SYNOPSIS
|
||||
.B runlevel
|
||||
.RI [ utmp ]
|
||||
.SH DESCRIPTION
|
||||
.B Runlevel
|
||||
.B runlevel
|
||||
reads the system
|
||||
.I utmp
|
||||
file (typically
|
||||
@ -55,4 +55,6 @@ The name of the \fIutmp\fP file to read.
|
||||
.BR init (8),
|
||||
.BR utmp (5)
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
|
@ -17,7 +17,7 @@
|
||||
.\"
|
||||
.\"{{{}}}
|
||||
.\"{{{ Title
|
||||
.TH SHUTDOWN 8 "November 12, 2003" "" "Linux System Administrator's Manual"
|
||||
.TH SHUTDOWN 8 "November 12, 2003" "sysvinit " "Linux System Administrator's Manual"
|
||||
.\"}}}
|
||||
.\"{{{ Name
|
||||
.SH NAME
|
||||
@ -26,7 +26,7 @@ shutdown \- bring the system down
|
||||
.\"{{{ Synopsis
|
||||
.SH SYNOPSIS
|
||||
.B /sbin/shutdown
|
||||
.RB [ \-akrhPHfFnc ]
|
||||
.RB [ \-akrhPHfFncqQ ]
|
||||
.RB [ \-t
|
||||
.IR sec ]
|
||||
.I time
|
||||
@ -35,10 +35,10 @@ shutdown \- bring the system down
|
||||
.\"{{{ 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 \fIlogin\fP(1) is blocked.
|
||||
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 \fIvi\fP(1)
|
||||
signal \fBSIGTERM\fP. 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,
|
||||
@ -46,7 +46,7 @@ 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.
|
||||
if neither the \fB-h\fP or \fB-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.
|
||||
.\"}}}
|
||||
@ -54,7 +54,7 @@ entries for these runlevels in the file \fI/etc/inittab\fP.
|
||||
.SH OPTIONS
|
||||
.\"{{{ -a
|
||||
.IP "\fB\-a\fP
|
||||
Use \fB/etc/shutdown.allow\fP.
|
||||
Use \fI/etc/shutdown.allow\fP.
|
||||
.\"}}}
|
||||
.\"{{{ -k
|
||||
.IP \fB\-k\fP
|
||||
@ -66,30 +66,30 @@ Reboot after shutdown.
|
||||
.\"}}}
|
||||
.\"{{{ -h
|
||||
.IP \fB\-h\fP
|
||||
Halt or power off after shutdown. Usually used with the \fI-P\fP or \fI-H\fP flags,
|
||||
Halt or power off after shutdown. Usually used with the \fB-P\fP or \fB-H\fP flags,
|
||||
depending on whether we want to poweroff or simply stop the operating system.
|
||||
.\"}}}
|
||||
.\"{{{ -P
|
||||
.IP \fB\-P\fP
|
||||
Modifier to the \fI-h\fP flag. Halt action is to turn off the power.
|
||||
Must be used with the \fI-h\fP flag.
|
||||
Modifier to the \fB-h\fP flag. Halt action is to turn off the power.
|
||||
Must be used with the \fB-h\fP flag.
|
||||
.\"}}}
|
||||
.\"{{{ -H
|
||||
.IP \fB\-H\fP
|
||||
Modifier to the \fI-h\fP flag. Halt action is to halt or drop into boot
|
||||
monitor on systems that support it. Must be used with the \fI-h\fP flag.
|
||||
Modifier to the \fB-h\fP flag. Halt action is to halt or drop into boot
|
||||
monitor on systems that support it. Must be used with the \fB-h\fP flag.
|
||||
Halting is often used to run through the shutdown process and leave
|
||||
output on the screen for debugging purposes. Or when the user wants the OS to
|
||||
stop, but leave the power on. To power off at the end of the shutdown sequence
|
||||
use the \fI-P\fP modifier instead.
|
||||
use the \fB-P\fP modifier instead.
|
||||
.\"}}}
|
||||
.\"{{{ -f
|
||||
.IP \fB\-f\fP
|
||||
Skip \fIfsck\fP on reboot.
|
||||
Skip \fBfsck\fP(8) on reboot.
|
||||
.\"}}}
|
||||
.\"{{{ -F
|
||||
.IP \fB\-F\fP
|
||||
Force \fIfsck\fP on reboot.
|
||||
Force \fBfsck\fP(8) on reboot.
|
||||
.\"}}}
|
||||
.\"{{{ -n
|
||||
.IP \fB\-n\fP
|
||||
@ -99,34 +99,34 @@ you'd expect.
|
||||
.\"}}}
|
||||
.\"{{{ -c
|
||||
.IP \fB\-c\fP
|
||||
Cancel a waiting shutdown. ("shutdown now" is no longer waiting.) With
|
||||
Cancel a waiting shutdown. (\fBshutdown now\fP is no longer waiting.) With
|
||||
this option it is of course not possible to give the time argument, but
|
||||
you can enter explanatory message arguments on the command line that
|
||||
will be sent to all users.
|
||||
.\"{{{ -q
|
||||
.IP \fB\-q
|
||||
Reduce the number of warnings shutdown displays. Usually shutdown displays
|
||||
Reduce the number of warnings \fBshutdown\fP displays. Usually \fBshutdown\fP displays
|
||||
warnings every 15 minutes and then every minute in the last 10 minutes of the
|
||||
countdown until \fItime\fP is reached. When \-q is specified
|
||||
shutdown only warns at 60 minute intervals, at the 10 minute mark,
|
||||
at the 5 minue mark, and when the shutdown process actually happens.
|
||||
countdown until \fItime\fP is reached. When \fB-q\fP is specified
|
||||
\fBshutdown\fP only warns at 60 minute intervals, at the 10 minute mark,
|
||||
at the 5 minute mark, and when the shutdown process actually happens.
|
||||
.\"{{{ -Q
|
||||
.IP \fB\-Q
|
||||
Silence warnings prior to shutting down. Usually shutdown displays
|
||||
Silence warnings prior to shutting down. Usually \fBshutdown\fP displays
|
||||
warnings every 15 minutes and then every minute in the last 10 minutes of the
|
||||
countdown until \fItime\fP is reached. When \fI-Q\fP is specified
|
||||
shutdown only warns when the shutdown process actually happens. All
|
||||
countdown until \fItime\fP is reached. When \fB-Q\fP is specified
|
||||
\fBshutdown\fP only warns when the shutdown process actually happens. All
|
||||
other warning intervals are suppressed.
|
||||
.\"}}}
|
||||
.\"{{{ -t sec
|
||||
.IP "\fB\-t\fP \fIsec\fP"
|
||||
Tell \fBinit\fP(8) to wait \fIsec\fP seconds between sending all processes the
|
||||
warning (SIGTERM) and the kill signal (SIGKILL), before changing to another runlevel.
|
||||
warning (\fBSIGTERM\fP) and the kill signal (\fBSIGKILL\fP), before changing to another runlevel.
|
||||
The default time, if no value is specified, between these two signals is
|
||||
three seconds. Warning: when shutdown calls init to perform the shutdown (the
|
||||
default behaviour), init checks to see if all processes have terminated
|
||||
three seconds. Warning: when \fBshutdown\fP calls \fBinit\fP(8) to perform the shutdown (the
|
||||
default behavior), \fBinit\fP(8) checks to see if all processes have terminated
|
||||
and will stop waiting early once its children have all terminated.
|
||||
When shutdown is called with the \fI-n\fP flag, it waits the full time specified
|
||||
When \fBshutdown\fP is called with the \fB-n\fP flag, it waits the full time specified
|
||||
(or three seconds) even if all other processes have terminated.
|
||||
.\"}}}
|
||||
.\"{{{ time
|
||||
@ -146,28 +146,28 @@ number of minutes to wait. Third, it can be in the format \fB+\fP\fIhh:mm\fP,
|
||||
in which \fIhh:mm\fP is the number of hours and 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
|
||||
If \fBshutdown\fP 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
|
||||
which causes programs such as \fBlogin\fP(1) 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
|
||||
starts. \fBshutdown\fP 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.
|
||||
It also removes it before calling \fBinit\fP(8) 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.
|
||||
to run \fBfsck\fP(8) 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
|
||||
to run \fBfsck\fP(8) 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,
|
||||
The \fB-n\fP flag causes \fBshutdown\fP not to call \fBinit\fP(8),
|
||||
but to kill all running processes itself.
|
||||
\fBshutdown\fP will then turn off quota, accounting, and swapping
|
||||
and unmount all file systems.
|
||||
@ -180,7 +180,7 @@ and unmount all file systems.
|
||||
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),
|
||||
argument (add this to the invocation of shutdown in \fI/etc/inittab\fP),
|
||||
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
|
||||
@ -195,12 +195,12 @@ 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 \fI-a\fP
|
||||
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 script (usually /etc/init.d/halt) that calls
|
||||
The \fB-H\fP option just sets the \fBinit\fP environment variable
|
||||
\fBINIT_HALT\fP to \fBHALT\fP, and the \fB-P\fP option just sets
|
||||
that variable to \fBPOWEROFF\fP. The script (usually \fI/etc/init.d/halt\fP) that calls
|
||||
the \fBhalt\fP(8) program as the last thing in the shutting down sequence should
|
||||
check this environment variable and call the \fBhalt\fP(8) program with
|
||||
the right options for these options to actually have any effect.
|
||||
@ -219,18 +219,20 @@ 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.
|
||||
\fBinit\fP(8) can only capture CTRL-ALT-DEL and start \fBshutdown\fP 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
|
||||
\fBshutdown\fP wasn't designed to be run setuid. \fI/etc/shutdown.allow\fP 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
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.\"}}}
|
||||
.\"{{{ See also
|
||||
.SH "SEE ALSO"
|
||||
|
@ -15,7 +15,7 @@
|
||||
.\" 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"
|
||||
.TH SULOGIN 8 "17 Jan 2006" "sysvinit " "Linux System Administrator's Manual"
|
||||
.SH NAME
|
||||
sulogin \- Single-user login
|
||||
.SH SYNOPSIS
|
||||
@ -26,22 +26,22 @@ sulogin \- Single-user login
|
||||
[ \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
|
||||
is invoked by \fBinit\fP(8) when the system goes into single user mode.
|
||||
(This is done through an entry in \fBinittab\fP(5).)
|
||||
\fBinit\fP(8) also
|
||||
tries to execute \fBsulogin\fP when
|
||||
the boot loader (e.g., \fBgrub\fP(8))
|
||||
passes it the \fB\-b\fP option.
|
||||
.PP
|
||||
The user is prompted
|
||||
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
|
||||
\fBsulogin\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).
|
||||
(typically \fI/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.
|
||||
@ -49,39 +49,42 @@ the given number of seconds for user input.
|
||||
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.
|
||||
The default is \fBnot\fP to do this,
|
||||
so that the shell will \fBnot\fP read \fI/etc/profile\fP
|
||||
or \fI$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
|
||||
\fBsulogin\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.
|
||||
is not set, it will try to execute root's shell from \fI/etc/passwd\fP. If that
|
||||
fails it will fall back to \fI/bin/sh\fP.
|
||||
.PP
|
||||
This is very valuable together with the \fB\-b\fP option to init. To boot
|
||||
This is very valuable together with the \fB\-b\fP option to \fBinit\fP(8). 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)
|
||||
\fBsulogin\fP checks the root password using the standard method (\fBgetpwnam\fP(3))
|
||||
first.
|
||||
Then, if the \fB\-e\fP option was specified,
|
||||
\fIsulogin\fP examines these files directly to find the root password:
|
||||
\fBsulogin\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
|
||||
If they are damaged or nonexistent, \fBsulogin\fP 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>
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
.SH SEE ALSO
|
||||
init(8), inittab(5).
|
||||
.BR init (8),
|
||||
.BR inittab (5)
|
||||
|
@ -15,7 +15,7 @@
|
||||
.\" along with this program; if not, write to the Free Software
|
||||
.\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.\"
|
||||
.TH UTMPDUMP 1 "Februar 8, 2010" "" "Linux System Administrator's Manual"
|
||||
.TH UTMPDUMP 1 "Februar 8, 2010" "sysvinit " "User Commands"
|
||||
.SH NAME
|
||||
utmpdump \- dump UTMP and WTMP files in raw format
|
||||
.SH SYNOPSIS
|
||||
|
30
man/wall.1
30
man/wall.1
@ -15,27 +15,27 @@
|
||||
.\" 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"
|
||||
.TH WALL 1 "15 April 2003" "sysvinit " "User Commands"
|
||||
|
||||
.SH NAME
|
||||
wall -- send a message to everybody's terminal.
|
||||
wall - send a message to everybody's terminal
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B wall
|
||||
.RB [ \-n ]
|
||||
.RB [ " message " ]
|
||||
.RI [ message ]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B Wall
|
||||
sends a message to everybody logged in with their
|
||||
.IR mesg (1)
|
||||
.BR mesg (1)
|
||||
permission
|
||||
set to
|
||||
.BR yes .
|
||||
The message can be given as an argument to
|
||||
.IR wall ,
|
||||
.BR wall ,
|
||||
or it can be sent to
|
||||
.IR wall 's
|
||||
.BR wall 's
|
||||
standard input. When using the standard input from a terminal,
|
||||
the message should be terminated with the
|
||||
.B EOF
|
||||
@ -43,7 +43,7 @@ key (usually Control-D).
|
||||
.PP
|
||||
The length of the message is limited to 20 lines.
|
||||
For every invocation of
|
||||
.I wall
|
||||
.B wall
|
||||
a notification will be written to syslog, with facility
|
||||
.B LOG_USER
|
||||
and level
|
||||
@ -52,24 +52,26 @@ and level
|
||||
.SH OPTIONS
|
||||
.IP \fB\-n\fP
|
||||
Suppresses the normal banner printed by
|
||||
.IR wall ,
|
||||
.BR wall ,
|
||||
changing it to "Remote broadcast message".
|
||||
This option is only available for root if
|
||||
.I wall
|
||||
.B wall
|
||||
is installed set-group-id, and is used by
|
||||
.IR rpc.walld (8).
|
||||
.BR rpc.walld (8).
|
||||
.PP
|
||||
|
||||
.SH ENVIRONMENT
|
||||
.I Wall
|
||||
.B 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).
|
||||
.BR mesg (1),
|
||||
.BR rpc.rwalld (8)
|
||||
|
||||
.SH AUTHOR
|
||||
Miquel van Smoorenburg, miquels@cistron.nl
|
||||
.MT miquels@\:cistron\:.nl
|
||||
Miquel van Smoorenburg
|
||||
.ME
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include <fcntl.h>
|
||||
#ifdef __linux__
|
||||
#include <pty.h>
|
||||
#include <sys/sysmacros.h>
|
||||
#endif
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
@ -106,13 +107,27 @@ void handler(int sig)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* chdir with error message on fail.
|
||||
*/
|
||||
static int chdir_int(const char *path)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = chdir(path)) != 0) {
|
||||
const char *msgprefix = "bootlogd: %s";
|
||||
char msg[PATH_MAX + sizeof(msgprefix)];
|
||||
snprintf(msg, sizeof(msg), msgprefix, path);
|
||||
perror(msg);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Scan /dev and find the device name.
|
||||
*/
|
||||
/*
|
||||
This function does not appear to be called anymore. Commenting it
|
||||
out for now, can probably be removed entirely in the future.
|
||||
|
||||
static int findtty(char *res, const char *startdir, int rlen, dev_t dev)
|
||||
{
|
||||
DIR *dir;
|
||||
@ -121,13 +136,8 @@ static int findtty(char *res, const char *startdir, int rlen, dev_t dev)
|
||||
int r = -1;
|
||||
char *olddir = getcwd(NULL, 0);
|
||||
|
||||
if (chdir(startdir) < 0 || (dir = opendir(".")) == NULL) {
|
||||
int msglen = strlen(startdir) + 11;
|
||||
char *msg = malloc(msglen);
|
||||
snprintf(msg, msglen, "bootlogd: %s", startdir);
|
||||
perror(msg);
|
||||
free(msg);
|
||||
chdir(olddir);
|
||||
if (chdir_int(startdir) < 0 || (dir = opendir(".")) == NULL) {
|
||||
chdir_int(olddir);
|
||||
return -1;
|
||||
}
|
||||
while ((ent = readdir(dir)) != NULL) {
|
||||
@ -142,7 +152,7 @@ static int findtty(char *res, const char *startdir, int rlen, dev_t dev)
|
||||
free(path);
|
||||
if (0 == r) {
|
||||
closedir(dir);
|
||||
chdir(olddir);
|
||||
chdir_int(olddir);
|
||||
return 0;
|
||||
}
|
||||
continue;
|
||||
@ -153,22 +163,21 @@ static int findtty(char *res, const char *startdir, int rlen, dev_t dev)
|
||||
if ( (int) (strlen(ent->d_name) + strlen(startdir) + 1) >= rlen) {
|
||||
fprintf(stderr, "bootlogd: console device name too long\n");
|
||||
closedir(dir);
|
||||
chdir(olddir);
|
||||
chdir_int(olddir);
|
||||
return -1;
|
||||
} else {
|
||||
snprintf(res, rlen, "%s/%s", startdir, ent->d_name);
|
||||
closedir(dir);
|
||||
chdir(olddir);
|
||||
chdir_int(olddir);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
closedir(dir);
|
||||
|
||||
chdir(olddir);
|
||||
chdir_int(olddir);
|
||||
return r;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@ -272,7 +281,7 @@ int isconsole(char *s, char *res, int rlen)
|
||||
int consolenames(struct real_cons *cons, int max_consoles)
|
||||
{
|
||||
#ifdef TIOCGDEV
|
||||
/* This appears to be unused. unsigned int kdev; */
|
||||
unsigned int kdev;
|
||||
#endif
|
||||
struct stat st, st2;
|
||||
char buf[KERNEL_COMMAND_LENGTH];
|
||||
@ -343,6 +352,32 @@ dontuse:
|
||||
p--;
|
||||
}
|
||||
|
||||
if (num_consoles > 0) return num_consoles;
|
||||
#endif
|
||||
fstat(0, &st);
|
||||
if (major(st.st_rdev) != 5 || minor(st.st_rdev) != 1) {
|
||||
/*
|
||||
* Old kernel, can find real device easily.
|
||||
*/
|
||||
int r = findtty(cons[num_consoles].name, "/dev",
|
||||
sizeof(cons[num_consoles].name), st.st_rdev);
|
||||
if (!r)
|
||||
num_consoles++;
|
||||
}
|
||||
|
||||
if (num_consoles > 0) return num_consoles;
|
||||
|
||||
#ifdef TIOCGDEV
|
||||
# ifndef ENOIOCTLCMD
|
||||
# define ENOIOCTLCMD 515
|
||||
# endif
|
||||
if (ioctl(0, TIOCGDEV, &kdev) == 0) {
|
||||
int r = findtty(cons[num_consoles].name, "/dev",
|
||||
sizeof(cons[num_consoles].name), (dev_t)kdev);
|
||||
if (!r)
|
||||
num_consoles++;
|
||||
}
|
||||
|
||||
if (num_consoles > 0) return num_consoles;
|
||||
#endif
|
||||
|
||||
|
@ -1097,10 +1097,12 @@ pid_t spawn(CHILD *ch, int *res)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (proc[0] == '@') proc++; /*skip leading backslash */
|
||||
args[6] = proc;
|
||||
args[7] = NULL;
|
||||
} else if (strpbrk(proc, "~`!$^&*()=|\\{}[];\"'<>?")) {
|
||||
} else if ( (strpbrk(proc, "~`!$^&*()=|\\{}[];\"'<>?")) && (proc[0] != '@') ){
|
||||
/* See if we need to fire off a shell for this command */
|
||||
/* Do not launch shell if first character in proc string is an at symbol */
|
||||
/* Give command line to shell */
|
||||
args[1] = SHELL;
|
||||
args[2] = "-c";
|
||||
@ -1111,6 +1113,7 @@ pid_t spawn(CHILD *ch, int *res)
|
||||
} else {
|
||||
/* Split up command line arguments */
|
||||
buf[0] = 0;
|
||||
if (proc[0] == '@') proc++;
|
||||
strncat(buf, proc, sizeof(buf) - 1);
|
||||
ptr = buf;
|
||||
for(f = 1; f < 15; f++) {
|
||||
|
Loading…
Reference in New Issue
Block a user