Changed sulogin's respawn in inittab to 'once'
[linux_from_scratch.git] / BOOK / chapter06 / config-glibc.xml
blobf04711c2f1f7fe7b7c38a42d581d237f15080303
1 <sect2><title>Configuring Glibc</title>
3 <para>We need to create the /etc/nsswitch.conf file. Although glibc should 
4 provide defaults when this file is missing or corrupt, its defaults don't work
5 well with networking which will be dealt with in a later chapter. Also, our
6 timezone needs to be set up.</para>
8 <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
9 following:</para>
11 <para><screen><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"</userinput>
12 # Begin /etc/nsswitch.conf
14 passwd: files
15 group: files
16 shadow: files
18 publickey: files
20 hosts: files dns
21 networks: files
23 protocols: db files
24 services: db files
25 ethers: db files
26 rpc: db files
28 netgroup: db files
30 # End /etc/nsswitch.conf
31 <userinput>EOF</userinput></screen></para>
33 <para>The <userinput>tzselect</userinput> script has to be run and the 
34 questions regarding your timezone have to be answered.
35 When you're done, the script will give the 
36 location of the needed timezone file.</para>
38 <para> Create the <filename class="directory">/etc/localtime</filename> symlink
39 by running:</para>
41 <para><screen><userinput>ln -sf ../usr/share/zoneinfo/&lt;tzselect's output&gt; /etc/localtime</userinput></screen></para>
43 <para>tzselect's output can be something like <emphasis>EST5EDT</emphasis> or
44 <emphasis>Canada/Eastern</emphasis>.</para>
46 <para>The symlink you'd create with that information would be:</para>
48 <para><screen><userinput>ln -sf ../usr/share/zoneinfo/EST5EDT /etc/localtime</userinput></screen></para>
50 <para>Or:</para>
52 <para><screen><userinput>ln -sf ../usr/share/zoneinfo/Canada/Eastern /etc/localtime </userinput></screen></para>
54 </sect2>