aboutsummaryrefslogtreecommitdiffstats
path: root/chapter07/setclock.xml
diff options
context:
space:
mode:
authorGerard Beekmans <gerard@linuxfromscratch.org>2002-01-15 21:32:01 +0000
committerGerard Beekmans <gerard@linuxfromscratch.org>2002-01-15 21:32:01 +0000
commit8d18f3d4a90124be837d4c086c2f5f04ee855c69 (patch)
treeb8d9057677a81d4131a55fd17e68f2761c4706a3 /chapter07/setclock.xml
parenteac0ee1d91c2e7552ae575bd254fbfc79be4cb45 (diff)
more updates to bootscripts
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1442 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter07/setclock.xml')
-rw-r--r--chapter07/setclock.xml57
1 files changed, 4 insertions, 53 deletions
diff --git a/chapter07/setclock.xml b/chapter07/setclock.xml
index 0c84eb7b7..c7fd116ea 100644
--- a/chapter07/setclock.xml
+++ b/chapter07/setclock.xml
@@ -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 &gt; /etc/init.d/setclock &lt;&lt; "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>