mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
more updates to bootscripts
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1442 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
eac0ee1d91
commit
8d18f3d4a9
@ -6,7 +6,7 @@
|
||||
&c7-usage;
|
||||
&c7-loadkeys;
|
||||
&c7-setclock;
|
||||
&c7-network;
|
||||
&c7-hostname;
|
||||
&c7-hosts;
|
||||
&c7-ethnet;
|
||||
|
||||
|
19
chapter07/hostname.xml
Normal file
19
chapter07/hostname.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<sect1 id="ch07-hostname">
|
||||
<title>Configuring the localnet script</title>
|
||||
<?dbhtml filename="hostname.html" dir="chapter07"?>
|
||||
|
||||
<para>Part of the localnet script is setting up the system's hostname. This
|
||||
needs to be configured in the /etc/sysconfig/network.</para>
|
||||
|
||||
<para>Create the /etc/sysconfig/network file and enter a hostname by
|
||||
running:</para>
|
||||
|
||||
<para><screen><userinput>echo "HOSTNAME=lfs" > /etc/sysconfig/network</userinput></screen></para>
|
||||
|
||||
<para><quote>lfs</quote> needs to be replaced with the name the computer is
|
||||
to be called. You should not enter the FQDN (Fully Qualified Domain
|
||||
Name) here. That information will be put in the
|
||||
<filename>/etc/hosts</filename> file later on.</para>
|
||||
|
||||
</sect1>
|
||||
|
@ -1,43 +1,15 @@
|
||||
<sect1 id="ch07-loadkeys">
|
||||
<title>Creating the loadkeys script</title>
|
||||
<title>Configuring the loadkeys script</title>
|
||||
<?dbhtml filename="loadkeys.html" dir="chapter07"?>
|
||||
|
||||
<para>You only need to create this script if you don't have a
|
||||
<para>You only need to create configure script if you don't have a
|
||||
default 101 keys US keyboard layout.</para>
|
||||
|
||||
<para>Create the <filename>/etc/init.d/loadkeys</filename> script by
|
||||
running the following command:</para>
|
||||
<para>The /etc/sysconfig/keyboard file contains the information the
|
||||
loadkeys script needs to operate. This file contains the LAYOUT variable
|
||||
which tells loadkeys what keymap to load that corresponds with your
|
||||
keyboard.</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/init.d/loadkeys << "EOF"</userinput>
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/loadkeys
|
||||
|
||||
#
|
||||
# Include the functions declared in the /etc/init.d/functions file
|
||||
#
|
||||
|
||||
source /etc/init.d/functions
|
||||
|
||||
#
|
||||
# Include /etc/sysconfig/keyboard which contains the LAYOUT variable
|
||||
#
|
||||
|
||||
source /etc/sysconfig/keyboard
|
||||
|
||||
#
|
||||
# Load the default keymap file
|
||||
#
|
||||
|
||||
echo -n "Loading keymap..."
|
||||
/bin/loadkeys $LAYOUT 2>/dev/null
|
||||
evaluate_retval
|
||||
|
||||
# End /etc/init.d/loadkeys
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
|
||||
<sect2>
|
||||
<title>Creating the /etc/sysconfig/keyboard file</title>
|
||||
|
||||
<para>Create a new file <filename>/etc/sysconfig/keyboard</filename>
|
||||
by running the following:</para>
|
||||
|
||||
@ -55,7 +27,5 @@ path to the keymap you have selected. For example, if you have chosen the
|
||||
US keymap, you would replace it with
|
||||
<userinput>/usr/share/kbd/keymaps/i386/qwerty/us.map.gz</userinput></para>
|
||||
|
||||
</sect2>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -1,16 +0,0 @@
|
||||
<sect1 id="ch07-network">
|
||||
<title>Creating the /etc/sysconfig/network file</title>
|
||||
<?dbhtml filename="network.html" dir="chapter07"?>
|
||||
|
||||
<para>A new file <filename>/etc/sysconfig/network</filename> is created and the
|
||||
hostname is put in it by running:</para>
|
||||
|
||||
<para><screen><userinput>echo "HOSTNAME=lfs" > /etc/sysconfig/network</userinput></screen></para>
|
||||
|
||||
<para><quote>lfs</quote> needs to be replaced with the name the computer is
|
||||
to be called. You should not enter the FQDN (Fully Qualified Domain
|
||||
Name) here. That information will be put in the
|
||||
<filename>/etc/hosts</filename> file later.</para>
|
||||
|
||||
</sect1>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<sect1 id="ch07-setclock">
|
||||
<title>Creating the setclock script</title>
|
||||
<title>Configuring the setclock script</title>
|
||||
<?dbhtml filename="setclock.html" dir="chapter07"?>
|
||||
|
||||
|
||||
<para>The following script is only for real use when the hardware clock (also
|
||||
<para>The setclock script is only for real use when the hardware clock (also
|
||||
known as BIOS or CMOS clock) isn't set to GMT time. The recommended
|
||||
setup is setting the hardware clock to GMT and having the time converted
|
||||
to localtime using the /etc/localtime symbolic link. But if an
|
||||
@ -13,53 +13,6 @@ the time is properly displayed on those OS'es. This script will then
|
||||
set the kernel time to the hardware clock without converting the time using
|
||||
the /etc/localtime symlink.</para>
|
||||
|
||||
<para>Create the <filename>/etc/init.d/setclock</filename> script by running
|
||||
the following command:</para>
|
||||
|
||||
<para><screen><userinput>cat > /etc/init.d/setclock << "EOF"</userinput>
|
||||
#!/bin/sh
|
||||
# Begin /etc/init.d/setclock
|
||||
|
||||
#
|
||||
# Include the functions declared in the /etc/init.d/functions file
|
||||
# and include the variables from the /etc/sysconfig/clock file
|
||||
#
|
||||
|
||||
source /etc/init.d/functions
|
||||
source /etc/sysconfig/clock
|
||||
|
||||
#
|
||||
# Right now we want to set the kernel clock according to the hardware
|
||||
# clock, so we use the -hctosys parameter.
|
||||
#
|
||||
|
||||
CLOCKPARAMS="--hctosys"
|
||||
|
||||
#
|
||||
# If the UTC variable is set in the /etc/sysconfig/clock file, add the
|
||||
# -u parameter as well which tells hwclock that the hardware clock is
|
||||
# set to UTC time instead of local time.
|
||||
#
|
||||
|
||||
case "$UTC" in
|
||||
yes|true|1)
|
||||
CLOCKPARAMS="$CLOCKPARAMS --utc"
|
||||
;;
|
||||
no|false|0)
|
||||
CLOCKPARAMS="$CLOCKPARAMS --localtime"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -n "Setting clock..."
|
||||
/sbin/hwclock $CLOCKPARAMS
|
||||
evaluate_retval
|
||||
|
||||
# End /etc/init.d/setclock
|
||||
<userinput>EOF</userinput></screen></para>
|
||||
|
||||
<sect2>
|
||||
<title>Creating the /etc/sysconfig/clock file</title>
|
||||
|
||||
<para>If you want to use this script on your system even if the
|
||||
hardware clock is set to GMT, then the UTC variable below has to be
|
||||
changed to the value of <emphasis>1</emphasis>.</para>
|
||||
@ -78,10 +31,8 @@ UTC=0
|
||||
<para>Now, you may want to take a look at a very good hint explaining how we
|
||||
deal with time on LFS at <ulink
|
||||
url="&hints-root;time.txt">&hints-root;time.txt</ulink>.
|
||||
It explains issues such as timezones, UTC, and the TZ
|
||||
environment variable.</para>
|
||||
|
||||
</sect2>
|
||||
It explains issues such as timezones, UTC, and the TZ environment
|
||||
variable.</para>
|
||||
|
||||
</sect1>
|
||||
|
||||
|
@ -334,7 +334,7 @@
|
||||
<!ENTITY c7-usage SYSTEM "chapter7/usage.xml">
|
||||
<!ENTITY c7-loadkeys SYSTEM "chapter7/loadkeys.xml">
|
||||
<!ENTITY c7-setclock SYSTEM "chapter7/setclock.xml">
|
||||
<!ENTITY c7-network SYSTEM "chapter7/network.xml">
|
||||
<!ENTITY c7-hostname SYSTEM "chapter7/hostname.xml">
|
||||
<!ENTITY c7-hosts SYSTEM "chapter7/hosts.xml">
|
||||
<!ENTITY c7-ethnet SYSTEM "chapter7/ethnet.xml">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user