Changeset 0cda898 for chapter07/usage.xml
- Timestamp:
- 08/02/2011 02:15:42 AM (13 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- a2e555d
- Parents:
- 75fe599
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/usage.xml
r75fe599 r0cda898 38 38 6: reboot the computer</literallayout> 39 39 40 <para>The command used to change run-levels is <command>init 40 <sect2 id="conf-sysvinit" role="configuration"> 41 <title>Configuring Sysvinit</title> 42 43 <indexterm zone="conf-sysvinit"> 44 <primary sortas="a-Sysvinit">Sysvinit</primary> 45 <secondary>configuring</secondary> 46 </indexterm> 47 48 <indexterm zone="conf-sysvinit"> 49 <primary sortas="e-/etc/inittab">/etc/inittab</primary> 50 </indexterm> 51 52 <para>During the kernel initialization, the first program that is run 53 is either specified on the command line or, by default 54 <command>init</command>. This program reads the initialization file 55 <filename>/etc/inittab</filename>. Create this file with:</para> 56 57 <screen><userinput>cat > /etc/inittab << "EOF" 58 <literal># Begin /etc/inittab 59 60 id:3:initdefault: 61 62 si::sysinit:/etc/rc.d/init.d/rc sysinit 63 64 l0:0:wait:/etc/rc.d/init.d/rc 0 65 l1:S1:wait:/etc/rc.d/init.d/rc 1 66 l2:2:wait:/etc/rc.d/init.d/rc 2 67 l3:3:wait:/etc/rc.d/init.d/rc 3 68 l4:4:wait:/etc/rc.d/init.d/rc 4 69 l5:5:wait:/etc/rc.d/init.d/rc 5 70 l6:6:wait:/etc/rc.d/init.d/rc 6 71 72 ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now 73 74 su:S016:once:/sbin/sulogin 75 76 1:2345:respawn:/sbin/agetty tty1 9600 77 2:2345:respawn:/sbin/agetty tty2 9600 78 3:2345:respawn:/sbin/agetty tty3 9600 79 4:2345:respawn:/sbin/agetty tty4 9600 80 5:2345:respawn:/sbin/agetty tty5 9600 81 6:2345:respawn:/sbin/agetty tty6 9600 82 83 # End /etc/inittab</literal> 84 EOF</userinput></screen> 85 86 <para>An explanation of this initialization file is in the man page for 87 <emphasis>inittab</emphasis>. For LFS, the key command that is run is 88 <command>rc</command>. The intialization file above will instruct 89 <command>rc</command> to run all the scripts starting with an S in the 90 <filename class="directory">/etc/rc.d/rcsysinit.d</filename> directory 91 followed by all the scripts starting with an S in the <filename 92 class="directory">/etc/rc.d/rc?.d</filename> directory where the question 93 mark is specified by the initdefault value.</para> 94 95 <para>As a convenience, the <command>rc</command> script reads a library of 96 functions in <filename class="directory">/lib/boot/functions</filename>. 97 This library also reads an optional configuration file, 98 <filename>/etc/sysconfig/init_params</filename>. Any of the system 99 configuration file parameters described in subsequent sections can be 100 alternatively placed in this file allowing consolidation of all system 101 parameters in thsi one file.</para> 102 103 <para>As a debugging convenience, the functions script also logs all output 104 to <filename>/run/var/bootlog</filename>. Since the <filename 105 class="directory">/run</filename> directory is a tmpfs, this file is not 106 persistent across boots.</para> 107 108 </sect2> 109 110 <sect2 id="init-levels" > 111 <title>Changing Run Levels</title> 112 113 <para>Changing run-levels is done with <command>init 41 114 <replaceable><runlevel></replaceable></command>, where 42 115 <replaceable><runlevel></replaceable> is the target run-level. For example, to … … 60 133 <para>The real scripts are in <filename 61 134 class="directory">/etc/rc.d/init.d</filename>. They do the actual work, and 62 the symlinks all point to them. K illing links and startinglinks point to135 the symlinks all point to them. K links and S links point to 63 136 the same script in <filename class="directory">/etc/rc.d/init.d</filename>. 64 137 This is because the scripts can be called with different parameters like … … 127 200 it can be done.</para> 128 201 202 </sect2> 203 129 204 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.