diff options
author | Alex Gronenwoud <alex@linuxfromscratch.org> | 2004-02-09 22:45:54 +0000 |
---|---|---|
committer | Alex Gronenwoud <alex@linuxfromscratch.org> | 2004-02-09 22:45:54 +0000 |
commit | 342b176cf9ee3261933eedc36e4d010fd62b36c9 (patch) | |
tree | 6e01b566503b95ca78e69c784879d85ea11c0fba | |
parent | c76accc624f1e3f31072f7645f5faa19ccd697b6 (diff) |
Merging configaration subsections into their corresponding sections.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3245 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter06/chapter06.xml | 57 | ||||
-rw-r--r-- | chapter06/config-glibc.xml | 94 | ||||
-rw-r--r-- | chapter06/config-keyboard.xml | 31 | ||||
-rw-r--r-- | chapter06/config-sysklogd.xml | 23 | ||||
-rw-r--r-- | chapter06/config-sysvinit.xml | 38 | ||||
-rw-r--r-- | chapter06/config-vim.xml | 29 | ||||
-rw-r--r-- | chapter06/glibc.xml | 94 | ||||
-rw-r--r-- | chapter06/kbd.xml | 32 | ||||
-rw-r--r-- | chapter06/mountproc.xml | 55 | ||||
-rw-r--r-- | chapter06/sysklogd.xml | 23 | ||||
-rw-r--r-- | chapter06/sysvinit.xml | 55 | ||||
-rw-r--r-- | chapter06/vim.xml | 29 | ||||
-rw-r--r-- | entities/book-structure.xml | 3 | ||||
-rw-r--r-- | entities/glibc.ent | 1 | ||||
-rw-r--r-- | entities/sysklogd.ent | 1 | ||||
-rw-r--r-- | entities/sysvinit.ent | 1 | ||||
-rw-r--r-- | entities/vim.ent | 1 |
17 files changed, 275 insertions, 292 deletions
diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index e008d7cd5..070284803 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -60,7 +60,62 @@ with a series of short descriptions of these.</para> </sect1> -&c6-mountproc; + +<sect1 id="ch-system-proc"> +<title>Mounting the proc and devpts file systems</title> +<?dbhtml filename="proc.html" dir="chapter06"?> + +<para>In order for certain programs to function properly, the +<emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be +available within the chroot environment. The proc file system is the process +information pseudo file system through which the kernel provides information +about the status of the system. And the devpts file system is nowadays the most +common way pseudo terminals (PTYs) are implemented. Since kernel version 2.4, a +file system can be mounted as many times and in as many places as you like, +thus it's not a problem that these file systems are already mounted on your +host system, especially so because they are virtual file systems.</para> + +<para>First become <emphasis>root</emphasis>, as only <emphasis>root</emphasis> +can mount file systems in unusual places. Then check again that the LFS +environment variable is set correctly by running <userinput>echo +$LFS</userinput> and making sure it shows the path to your LFS partition's +mount point, which is <filename class="directory">/mnt/lfs</filename> if you +followed our example.</para> + +<para>Now make the mount points for these filesystems:</para> + +<screen><userinput>mkdir -p $LFS/{proc,dev/pts}</userinput></screen> + +<para>Mount the <emphasis>proc</emphasis> file system with:</para> + +<screen><userinput>mount proc $LFS/proc -t proc</userinput></screen> + +<para>And mount the <emphasis>devpts</emphasis> file system with:</para> + +<screen><userinput>mount devpts $LFS/dev/pts -t devpts</userinput></screen> + +<para>This last command might fail with an error like:</para> + +<blockquote><screen>filesystem devpts not supported by kernel</screen></blockquote> + +<para>The most likely cause for this is that your host system's kernel was +compiled without support for the devpts file system. You can check which file +systems your kernel supports by peeking into its internals with +<command>cat /proc/filesystems</command>. If a file system type named +<emphasis>devfs</emphasis> is listed there, then we'll be able to work around +the problem by mounting the host's devfs file system on top of the new +<filename>/dev</filename> structure which we'll create later on in the section +on <xref linkend="ch-system-MAKEDEV"/>. If devfs was not listed, do not worry +because there is yet a third way to get PTYs working inside the chroot +environment. We'll cover this shortly in the aforementioned +<xref linkend="ch-system-MAKEDEV"/> section.</para> + +<para>Remember that if for any reason you stop working on your LFS, and start +again later, it's important to check that these file systems are mounted again +before entering the chroot environment, otherwise problems could occur.</para> + +</sect1> + <sect1 id="ch-system-chroot"> <title>Entering the chroot environment</title> diff --git a/chapter06/config-glibc.xml b/chapter06/config-glibc.xml deleted file mode 100644 index 6d74eed27..000000000 --- a/chapter06/config-glibc.xml +++ /dev/null @@ -1,94 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2><title>Configuring Glibc</title> - -<para>We need to create the <filename>/etc/nsswitch.conf</filename> file, -because, although Glibc provides defaults when this file is missing or corrupt, -the Glibc defaults don't work well with networking. Also, our time zone needs -to be set up.</para> - -<para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the -following:</para> - -<screen><userinput>cat > /etc/nsswitch.conf << "EOF"</userinput> -# Begin /etc/nsswitch.conf - -passwd: files -group: files -shadow: files - -publickey: files - -hosts: files dns -networks: files - -protocols: db files -services: db files -ethers: db files -rpc: db files - -netgroup: db files - -# End /etc/nsswitch.conf -<userinput>EOF</userinput></screen> - -<para>To find out what time zone you're in, run the following script:</para> - -<screen><userinput>tzselect</userinput></screen> - -<para>When you've answered a few questions about your location, the script will -output the name of your time zone, something like <emphasis>EST5EDT</emphasis> -or <emphasis>Canada/Eastern</emphasis>. Then create the -<filename>/etc/localtime</filename> file by running:</para> - -<screen><userinput>cp --remove-destination /usr/share/zoneinfo/Canada/Eastern /etc/localtime</userinput></screen> - -<para>The meaning of the option:</para> - -<itemizedlist> -<listitem><para><userinput>--remove-destination</userinput>: This is needed to -force removal of the already existing symbolic link. The reason why we copy -instead of symlink is to cover the situation where <filename>/usr</filename> is -on a separate partition. This could matter, for example, when booted into single -user mode.</para></listitem> -</itemizedlist> - -<para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in -the name of the time zone that the <command>tzselect</command> script -gave you.</para> - -</sect2> - -<sect2><title> </title><para> </para></sect2> - -<sect2> -<title>Configuring Dynamic Loader</title> - -<para>By default, the dynamic loader -(<filename>/lib/ld-linux.so.2</filename>) searches through <filename -class="directory">/lib</filename> and <filename -class="directory">/usr/lib</filename> for dynamic libraries that are needed -by programs when you run them. However, if there are libraries in -directories other than <filename class="directory">/lib</filename> and -<filename class="directory">/usr/lib</filename>, you need to add them to -the <filename>/etc/ld.so.conf</filename> file for the dynamic -loader to find them. Two directories that are commonly known to contain -additional libraries are <filename -class="directory">/usr/local/lib</filename> and <filename -class="directory">/opt/lib</filename>, so we add those directories to the -dynamic loader's search path.</para> - -<para>Create a new file <filename>/etc/ld.so.conf</filename> by running the -following:</para> - -<screen><userinput>cat > /etc/ld.so.conf << "EOF"</userinput> -# Begin /etc/ld.so.conf - -/usr/local/lib -/opt/lib - -# End /etc/ld.so.conf -<userinput>EOF</userinput></screen> - -</sect2> - diff --git a/chapter06/config-keyboard.xml b/chapter06/config-keyboard.xml deleted file mode 100644 index b8b85398a..000000000 --- a/chapter06/config-keyboard.xml +++ /dev/null @@ -1,31 +0,0 @@ -<sect2><title>Configuring your keyboard</title> - -<para>Few things are more annoying than using Linux while a wrong keymap -for your keyboard is loaded. If you have a standard US keyboard, however, you -can skip this section, as the US keymap is the default as long as you don't -change it.</para> - -<para>To change the default keymap, create the -<filename class="symlink">/usr/share/kbd/keymaps/defkeymap.map.gz</filename> -symlink by running the following command:</para> - -<screen><userinput>ln -s path/to/keymap /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen> - -<para>Of course, replace <filename>path/to/keymap</filename> with the path and -name of your keyboard's map file. For example, if you have a Dutch keyboard, -you would use <filename>i386/qwerty/nl.map.gz</filename>.</para> - -<para>Another way to set your keyboard's layout is to compile the keymap -into the kernel. This ensures that your keyboard will always work as expected, -even when you boot into maintenance mode (by passing `init=/bin/sh' to the -kernel), as then the bootscript that normally sets up your keymap isn't run.</para> - -<para>Run the following command to patch the current default keymap into the -kernel source. You will have to repeat this command whenever you unpack a -new kernel:</para> - -<screen><userinput>loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz > \ - /usr/src/linux-&kernel-version;/drivers/char/defkeymap.c</userinput></screen> - -</sect2> - diff --git a/chapter06/config-sysklogd.xml b/chapter06/config-sysklogd.xml deleted file mode 100644 index 72bc83a62..000000000 --- a/chapter06/config-sysklogd.xml +++ /dev/null @@ -1,23 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2><title>Configuring Sysklogd</title> - -<para>Create a new file <filename>/etc/syslog.conf</filename> by running the -following:</para> - -<screen><userinput>cat > /etc/syslog.conf << "EOF"</userinput> -# Begin /etc/syslog.conf - -auth,authpriv.* -/var/log/auth.log -*.*;auth,authpriv.none -/var/log/sys.log -daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -mail.* -/var/log/mail.log -user.* -/var/log/user.log -*.emerg * - -# End /etc/syslog.conf -<userinput>EOF</userinput></screen> - -</sect2> - diff --git a/chapter06/config-sysvinit.xml b/chapter06/config-sysvinit.xml deleted file mode 100644 index 8b1d9f887..000000000 --- a/chapter06/config-sysvinit.xml +++ /dev/null @@ -1,38 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2><title>Configuring Sysvinit</title> - -<para>Create a new file <filename>/etc/inittab</filename> 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> - diff --git a/chapter06/config-vim.xml b/chapter06/config-vim.xml deleted file mode 100644 index 7fa0650ac..000000000 --- a/chapter06/config-vim.xml +++ /dev/null @@ -1,29 +0,0 @@ -<sect2><title> </title><para> </para></sect2> - -<sect2><title>Configuring Vim</title> - -<para>By default, <command>vim</command> runs in vi-compatible mode. Some -people might like this, but we prefer to run <command>vim</command> in its -own mode (else we wouldn't have included it in this book, but the original -<command>vi</command>). Create a default vim configuration file by running -the following:</para> - -<screen><userinput>cat > /etc/vimrc << "EOF"</userinput> -" Begin /etc/vimrc - -set nocompatible -set backspace=2 -syntax on - -" End /etc/vimrc -<userinput>EOF</userinput></screen> - -<para>The <emphasis>set nocompatible</emphasis> will make -<command>vim</command> behave in a more useful way than the default -vi-compatible manner. The <emphasis>set backspace=2</emphasis> allows -backspacing over line breaks, autoindent and the start of insert. And the -<emphasis>syntax on</emphasis> switches on <command>vim</command>'s -semantic colouring.</para> - -</sect2> - diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index 5b8d60f4c..86dbcb09b 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -121,7 +121,99 @@ localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen> </sect2> -&c6-cf-glibc; +<sect2><title> </title><para> </para></sect2> + +<sect2><title>Configuring Glibc</title> + +<para>We need to create the <filename>/etc/nsswitch.conf</filename> file, +because, although Glibc provides defaults when this file is missing or corrupt, +the Glibc defaults don't work well with networking. Also, our time zone needs +to be set up.</para> + +<para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the +following:</para> + +<screen><userinput>cat > /etc/nsswitch.conf << "EOF"</userinput> +# Begin /etc/nsswitch.conf + +passwd: files +group: files +shadow: files + +publickey: files + +hosts: files dns +networks: files + +protocols: db files +services: db files +ethers: db files +rpc: db files + +netgroup: db files + +# End /etc/nsswitch.conf +<userinput>EOF</userinput></screen> + +<para>To find out what time zone you're in, run the following script:</para> + +<screen><userinput>tzselect</userinput></screen> + +<para>When you've answered a few questions about your location, the script will +output the name of your time zone, something like <emphasis>EST5EDT</emphasis> +or <emphasis>Canada/Eastern</emphasis>. Then create the +<filename>/etc/localtime</filename> file by running:</para> + +<screen><userinput>cp --remove-destination /usr/share/zoneinfo/Canada/Eastern /etc/localtime</userinput></screen> + +<para>The meaning of the option:</para> + +<itemizedlist> +<listitem><para><userinput>--remove-destination</userinput>: This is needed to +force removal of the already existing symbolic link. The reason why we copy +instead of symlink is to cover the situation where <filename>/usr</filename> is +on a separate partition. This could matter, for example, when booted into single +user mode.</para></listitem> +</itemizedlist> + +<para>Of course, instead of <emphasis>Canada/Eastern</emphasis>, fill in +the name of the time zone that the <command>tzselect</command> script +gave you.</para> + +</sect2> + +<sect2><title> </title><para> </para></sect2> + +<sect2> +<title>Configuring Dynamic Loader</title> + +<para>By default, the dynamic loader +(<filename>/lib/ld-linux.so.2</filename>) searches through <filename +class="directory">/lib</filename> and <filename +class="directory">/usr/lib</filename> for dynamic libraries that are needed +by programs when you run them. However, if there are libraries in +directories other than <filename class="directory">/lib</filename> and +<filename class="directory">/usr/lib</filename>, you need to add them to +the <filename>/etc/ld.so.conf</filename> file for the dynamic +loader to find them. Two directories that are commonly known to contain +additional libraries are <filename +class="directory">/usr/local/lib</filename> and <filename +class="directory">/opt/lib</filename>, so we add those directories to the +dynamic loader's search path.</para> + +<para>Create a new file <filename>/etc/ld.so.conf</filename> by running the +following:</para> + +<screen><userinput>cat > /etc/ld.so.conf << "EOF"</userinput> +# Begin /etc/ld.so.conf + +/usr/local/lib +/opt/lib + +# End /etc/ld.so.conf +<userinput>EOF</userinput></screen> + +</sect2> &aa-glibc-shortdesc; &aa-glibc-desc; diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml index 34cea17fc..854be7e1a 100644 --- a/chapter06/kbd.xml +++ b/chapter06/kbd.xml @@ -35,7 +35,37 @@ not installed. First enable the compilation of these utilities:</para> </sect2> -&c6-cf-keyboard; +<sect2><title>Configuring your keyboard</title> + +<para>Few things are more annoying than using Linux while a wrong keymap +for your keyboard is loaded. If you have a standard US keyboard, however, you +can skip this section, as the US keymap is the default as long as you don't +change it.</para> + +<para>To change the default keymap, create the +<filename class="symlink">/usr/share/kbd/keymaps/defkeymap.map.gz</filename> +symlink by running the following command:</para> + +<screen><userinput>ln -s path/to/keymap /usr/share/kbd/keymaps/defkeymap.map.gz</userinput></screen> + +<para>Of course, replace <filename>path/to/keymap</filename> with the path and +name of your keyboard's map file. For example, if you have a Dutch keyboard, +you would use <filename>i386/qwerty/nl.map.gz</filename>.</para> + +<para>Another way to set your keyboard's layout is to compile the keymap +into the kernel. This ensures that your keyboard will always work as expected, +even when you boot into maintenance mode (by passing `init=/bin/sh' to the +kernel), as then the bootscript that normally sets up your keymap isn't run.</para> + +<para>When in <xref linkend="chapter-mixture"/> you're ready to compile the +kernel, run the following command to patch the current default keymap into the +source (you will have to repeat this command whenever you unpack a new +kernel):</para> + +<screen><userinput>loadkeys -m /usr/share/kbd/keymaps/defkeymap.map.gz > \ + /usr/src/linux-&kernel-version;/drivers/char/defkeymap.c</userinput></screen> + +</sect2> &aa-kbd-shortdesc; &aa-kbd-desc; diff --git a/chapter06/mountproc.xml b/chapter06/mountproc.xml deleted file mode 100644 index 876dbd5c5..000000000 --- a/chapter06/mountproc.xml +++ /dev/null @@ -1,55 +0,0 @@ -<sect1 id="ch-system-proc"> -<title>Mounting the proc and devpts file systems</title> -<?dbhtml filename="proc.html" dir="chapter06"?> - -<para>In order for certain programs to function properly, the -<emphasis>proc</emphasis> and <emphasis>devpts</emphasis> file systems must be -available within the chroot environment. The proc file system is the process -information pseudo file system through which the kernel provides information -about the status of the system. And the devpts file system is nowadays the most -common way pseudo terminals (PTYs) are implemented. Since kernel version 2.4, a -file system can be mounted as many times and in as many places as you like, -thus it's not a problem that these file systems are already mounted on your -host system, especially so because they are virtual file systems.</para> - -<para>First become <emphasis>root</emphasis>, as only <emphasis>root</emphasis> -can mount file systems in unusual places. Then check again that the LFS -environment variable is set correctly by running <userinput>echo -$LFS</userinput> and making sure it shows the path to your LFS partition's -mount point, which is <filename class="directory">/mnt/lfs</filename> if you -followed our example.</para> - -<para>Now make the mount points for these filesystems:</para> - -<screen><userinput>mkdir -p $LFS/{proc,dev/pts}</userinput></screen> - -<para>Mount the <emphasis>proc</emphasis> file system with:</para> - -<screen><userinput>mount proc $LFS/proc -t proc</userinput></screen> - -<para>And mount the <emphasis>devpts</emphasis> file system with:</para> - -<screen><userinput>mount devpts $LFS/dev/pts -t devpts</userinput></screen> - -<para>This last command might fail with an error like:</para> - -<blockquote><screen>filesystem devpts not supported by kernel</screen></blockquote> - -<para>The most likely cause for this is that your host system's kernel was -compiled without support for the devpts file system. You can check which file -systems your kernel supports by peeking into its internals with -<command>cat /proc/filesystems</command>. If a file system type named -<emphasis>devfs</emphasis> is listed there, then we'll be able to work around -the problem by mounting the host's devfs file system on top of the new -<filename>/dev</filename> structure which we'll create later on in the section -on <xref linkend="ch-system-MAKEDEV"/>. If devfs was not listed, do not worry -because there is yet a third way to get PTYs working inside the chroot -environment. We'll cover this shortly in the aforementioned -<xref linkend="ch-system-MAKEDEV"/> section.</para> - -<para>Remember that if for any reason you stop working on your LFS, and start -again later, it's important to check that these file systems are mounted again -before entering the chroot environment, otherwise problems could occur.</para> - -</sect1> - diff --git a/chapter06/sysklogd.xml b/chapter06/sysklogd.xml index f23a151b1..9043544e8 100644 --- a/chapter06/sysklogd.xml +++ b/chapter06/sysklogd.xml @@ -26,7 +26,28 @@ as those given by the kernel when unusual things happen.</para> </sect2> -&c6-cf-sysklogd; +<sect2><title> </title><para> </para></sect2> + +<sect2><title>Configuring Sysklogd</title> + +<para>Create a new <filename>/etc/syslog.conf</filename> file by running the +following:</para> + +<screen><userinput>cat > /etc/syslog.conf << "EOF"</userinput> +# Begin /etc/syslog.conf + +auth,authpriv.* -/var/log/auth.log +*.*;auth,authpriv.none -/var/log/sys.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log +*.emerg * + +# End /etc/syslog.conf +<userinput>EOF</userinput></screen> + +</sect2> &aa-sysklogd-shortdesc; &aa-sysklogd-desc; diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml index 9d919ffeb..37e0046b5 100644 --- a/chapter06/sysvinit.xml +++ b/chapter06/sysvinit.xml @@ -16,15 +16,14 @@ running, and shutdown of your system.</para> <sect2> <title>Installation of Sysvinit</title> -<para>When run levels are changed (for example, when halting the system), -init sends the TERM and KILL signals to the processes which it started. -Init prints "Sending processes the TERM signal" to the screen. This seems -to imply that init is sending these signals to all the currently running -processes. To avoid this confusion, the init.c file can be modified, so -that the sentence reads "Sending processes started by init the TERM -signal".</para> - -<para>Edit the halt message:</para> +<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' \ @@ -40,7 +39,43 @@ sed 's/Sending processes/& started by init/g' \ </sect2> -&c6-cf-sysvinit; +<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; diff --git a/chapter06/vim.xml b/chapter06/vim.xml index fdb2b9d59..fd23e5ef3 100644 --- a/chapter06/vim.xml +++ b/chapter06/vim.xml @@ -61,7 +61,34 @@ installed. For more information read the Vim documentation.</para> </sect2> -&c6-cf-vim; +<sect2><title> </title><para> </para></sect2> + +<sect2><title>Configuring Vim</title> + +<para>By default, <command>vim</command> runs in vi-compatible mode. Some +people might like this, but we prefer to run <command>vim</command> in its +own mode (else we wouldn't have included it in this book, but the original +<command>vi</command>). Create a default vim configuration file by running +the following:</para> + +<screen><userinput>cat > /etc/vimrc << "EOF"</userinput> +" Begin /etc/vimrc + +set nocompatible +set backspace=2 +syntax on + +" End /etc/vimrc +<userinput>EOF</userinput></screen> + +<para>The <emphasis>set nocompatible</emphasis> will make +<command>vim</command> behave in a more useful way than the default +vi-compatible manner. The <emphasis>set backspace=2</emphasis> allows +backspacing over line breaks, autoindent and the start of insert. And the +<emphasis>syntax on</emphasis> switches on <command>vim</command>'s +semantic colouring.</para> + +</sect2> &aa-vim-shortdesc; &aa-vim-desc; diff --git a/entities/book-structure.xml b/entities/book-structure.xml index 24313e3e8..08fc8c9bb 100644 --- a/entities/book-structure.xml +++ b/entities/book-structure.xml @@ -29,9 +29,6 @@ <!ENTITY chapter06 SYSTEM "../chapter06/chapter06.xml"> <!ENTITY c6-aboutdebug SYSTEM "../chapter06/aboutdebug.xml"> -<!ENTITY c6-mountproc SYSTEM "../chapter06/mountproc.xml"> -<!ENTITY c6-cf-keyboard SYSTEM "../chapter06/config-keyboard.xml"> -<!ENTITY c6-cf-password SYSTEM "../chapter06/create-password.xml"> <!ENTITY chapter07 SYSTEM "../chapter07/chapter07.xml"> <!ENTITY c7-introduction SYSTEM "../chapter07/introduction.xml"> diff --git a/entities/glibc.ent b/entities/glibc.ent index 77ee4e11e..f04324d99 100644 --- a/entities/glibc.ent +++ b/entities/glibc.ent @@ -1,7 +1,6 @@ <!ENTITY c5-glibc SYSTEM "../chapter05/glibc.xml"> <!ENTITY c6-glibc SYSTEM "../chapter06/glibc.xml"> -<!ENTITY c6-cf-glibc SYSTEM "../chapter06/config-glibc.xml"> <!ENTITY aa-glibc-shortdesc SYSTEM "../appendixa/glibc-shortdesc.xml"> <!ENTITY aa-glibc-desc SYSTEM "../appendixa/glibc-desc.xml"> diff --git a/entities/sysklogd.ent b/entities/sysklogd.ent index 9478d2f3e..2f3bfd0bf 100644 --- a/entities/sysklogd.ent +++ b/entities/sysklogd.ent @@ -1,5 +1,4 @@ <!ENTITY c6-sysklogd SYSTEM "../chapter06/sysklogd.xml"> -<!ENTITY c6-cf-sysklogd SYSTEM "../chapter06/config-sysklogd.xml"> <!ENTITY c7-sysklogd SYSTEM "../chapter07/sysklogd.xml"> diff --git a/entities/sysvinit.ent b/entities/sysvinit.ent index 721d9d081..2d72e782f 100644 --- a/entities/sysvinit.ent +++ b/entities/sysvinit.ent @@ -1,5 +1,4 @@ <!ENTITY c6-sysvinit SYSTEM "../chapter06/sysvinit.xml"> -<!ENTITY c6-cf-sysvinit SYSTEM "../chapter06/config-sysvinit.xml"> <!ENTITY aa-sysvinit-shortdesc SYSTEM "../appendixa/sysvinit-shortdesc.xml"> <!ENTITY aa-sysvinit-desc SYSTEM "../appendixa/sysvinit-desc.xml"> diff --git a/entities/vim.ent b/entities/vim.ent index d37823c02..241d1753e 100644 --- a/entities/vim.ent +++ b/entities/vim.ent @@ -1,5 +1,4 @@ <!ENTITY c6-vim SYSTEM "../chapter06/vim.xml"> -<!ENTITY c6-cf-vim SYSTEM "../chapter06/config-vim.xml"> <!ENTITY aa-vim-shortdesc SYSTEM "../appendixa/vim-shortdesc.xml"> <!ENTITY aa-vim-dep SYSTEM "../appendixa/vim-dep.xml"> |