mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-20 14:07:39 +00:00
342b176cf9
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3245 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
85 lines
2.4 KiB
XML
85 lines
2.4 KiB
XML
<sect1 id="ch-system-sysvinit" xreflabel="Sysvinit">
|
|
<title>Installing Sysvinit-&sysvinit-version;</title>
|
|
<?dbhtml filename="sysvinit.html" dir="chapter06"?>
|
|
|
|
<para>The Sysvinit package contains programs for controlling the startup,
|
|
running, and shutdown of your system.</para>
|
|
|
|
<screen>&buildtime; &sysvinit-time;
|
|
&diskspace; &sysvinit-compsize;</screen>
|
|
|
|
&aa-sysvinit-down;
|
|
&aa-sysvinit-dep;
|
|
|
|
<sect2><title> </title><para> </para></sect2>
|
|
|
|
<sect2>
|
|
<title>Installation of Sysvinit</title>
|
|
|
|
<para>When runlevels are changed (for example, when halting the system),
|
|
<command>init</command> sends termination signals to those processes that it
|
|
itself started and that shouldn't be running in the new runlevel. While doing
|
|
this, <command>init</command> 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:</para>
|
|
|
|
<screen><userinput>cp src/init.c{,.backup}
|
|
sed 's/Sending processes/& started by init/g' \
|
|
src/init.c.backup > src/init.c</userinput></screen>
|
|
|
|
<para>Compile Sysvinit:</para>
|
|
|
|
<screen><userinput>make -C src</userinput></screen>
|
|
|
|
<para>And install it:</para>
|
|
|
|
<screen><userinput>make -C src install</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
<sect2><title> </title><para> </para></sect2>
|
|
|
|
<sect2><title>Configuring Sysvinit</title>
|
|
|
|
<para>Create a new <filename>/etc/inittab</filename> file by running the
|
|
following:</para>
|
|
|
|
<screen><userinput>cat > /etc/inittab << "EOF"</userinput>
|
|
# Begin /etc/inittab
|
|
|
|
id:3:initdefault:
|
|
|
|
si::sysinit:/etc/rc.d/init.d/rc sysinit
|
|
|
|
l0:0:wait:/etc/rc.d/init.d/rc 0
|
|
l1:S1:wait:/etc/rc.d/init.d/rc 1
|
|
l2:2:wait:/etc/rc.d/init.d/rc 2
|
|
l3:3:wait:/etc/rc.d/init.d/rc 3
|
|
l4:4:wait:/etc/rc.d/init.d/rc 4
|
|
l5:5:wait:/etc/rc.d/init.d/rc 5
|
|
l6:6:wait:/etc/rc.d/init.d/rc 6
|
|
|
|
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
|
|
|
|
su:S016:once:/sbin/sulogin
|
|
|
|
1:2345:respawn:/sbin/agetty tty1 9600
|
|
2:2345:respawn:/sbin/agetty tty2 9600
|
|
3:2345:respawn:/sbin/agetty tty3 9600
|
|
4:2345:respawn:/sbin/agetty tty4 9600
|
|
5:2345:respawn:/sbin/agetty tty5 9600
|
|
6:2345:respawn:/sbin/agetty tty6 9600
|
|
|
|
# End /etc/inittab
|
|
<userinput>EOF</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
&aa-sysvinit-shortdesc;
|
|
&aa-sysvinit-desc;
|
|
|
|
</sect1>
|
|
|