From 673b0d84ba9591e07c0bdf0ee49d92eba10f502c Mon Sep 17 00:00:00 2001 From: Matthew Burgess Date: Mon, 3 May 2004 10:59:46 +0000 Subject: * Merged newxml into HEAD git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3435 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/sysvinit.xml | 129 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 107 insertions(+), 22 deletions(-) (limited to 'chapter06/sysvinit.xml') diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml index 37e0046b5..48418db53 100644 --- a/chapter06/sysvinit.xml +++ b/chapter06/sysvinit.xml @@ -1,47 +1,56 @@ + + + %general-entities; +]> -Installing Sysvinit-&sysvinit-version; - +Sysvinit-&sysvinit-version; + + +Sysvinit The Sysvinit package contains programs for controlling the startup, running, and shutdown of your system. -&buildtime; &sysvinit-time; -&diskspace; &sysvinit-compsize; +&buildtime; 0.1 SBU +&diskspace; 0.9 MB + +Sysvinit installation depends on: Binutils, Coreutils, GCC, Glibc, Make. -&aa-sysvinit-down; -&aa-sysvinit-dep; -   Installation of Sysvinit -When runlevels are changed (for example, when halting the system), -init sends termination signals to those processes that it -itself started and that shouldn't be running in the new runlevel. While doing -this, init outputs messages like "Sending processes the TERM -signal" which seem to imply that it is sending these signals to all currently -running processes. To avoid this misinterpretation, you can modify the source -so that these messages read like "Sending processes started by init the TERM -signal" instead: +When run-levels are changed (for example, when halting the system), +init sends termination signals to those processes that +init itself started and that shouldn't be running in the new +run-level. While doing this, init outputs messages like +Sending processes the TERM signal which seem to imply that it is sending these signals to all currently running processes. To avoid this +misinterpretation, you can modify the source so that these messages read like +Sending processes started by init the TERM signal instead: cp src/init.c{,.backup} sed 's/Sending processes/& started by init/g' \ -    src/init.c.backup > src/init.c + src/init.c.backup > src/init.c Compile Sysvinit: make -C src -And install it: +Then install it: make -C src install -   -Configuring Sysvinit +Configuring Sysvinit + +Sysvinit +configuring + +/etc/inittab Create a new /etc/inittab file by running the following: @@ -77,8 +86,84 @@ su:S016:once:/sbin/sulogin -&aa-sysvinit-shortdesc; -&aa-sysvinit-desc; - +Contents of Sysvinit + +Installed programs: halt, init, killall5, last, +lastb (link to last), mesg, pidof (link to killall5), poweroff (link to halt), +reboot (link to halt), runlevel, shutdown, sulogin, telinit (link to init), +utmpdump and wall + + + + +Short descriptions + +halt +halt normally invokes shutdown with the -h flag, +except when already in run-level 0, then it tells the kernel to halt the system. +But first it notes in the file /var/log/wtmp that the +system is being brought down. + +init +init is the mother of all processes. It reads its +commands from /etc/inittab, which normally tell it which +scripts to run for which run-level, and how many gettys to spawn. + +killall5 +killall5 sends a signal to all processes, except +the processes in its own session -- so it won't kill the shell running the +script that called it. + +last +last shows which users last logged in (and out), +searching back through the file /var/log/wtmp. It can +also show system boots and shutdowns, and run-level changes. + +lastb +lastb shows the failed login attempts, as logged +in /var/log/btmp. + +mesg +mesg controls whether other users can send +messages to the current user's terminal. +pidof +pidof reports the PIDs of the given programs. + +poweroff +poweroff tells the kernel to halt the system and +switch off the computer. But see halt. + +reboot +reboot tells the kernel to reboot the system. +But see halt. + +runlevel +runlevel reports the previous and the current +run-level, as noted in the last run-level record in +/var/run/utmp. + +shutdown +shutdown brings the system down in a secure way, +signaling all processes and notifying all logged-in users. + +sulogin +sulogin allows the superuser to log in. It is +normally invoked by init when the system goes into single user mode. + +telinit +telinit tells init which run-level to enter. + +utmpdump +utmpdump displays the content of the given login +file in a friendlier format. + +wall +wall writes a message to all logged-in users. + + + + + + -- cgit v1.2.3-54-g00ecf