Sysklogd and timezone problems.

Gerard Beekmans gerard at linuxfromscratch.org
Tue Jul 18 12:54:09 PDT 2000


> 1) Sysklogd.
> When I boot LFS and the sysklogd script is executed, I get the following
> error message:
> "sysklogd: cannot create /dev/log: invalid argument"
> However, the script returns "OK". I don't understand the problem here.

Is the partition in read-write mode at the time the sysklogd script is
started? Syslog and/or klog need to create the /dev/log file thus you
need a root partition in read-write.

In the sysklogd script add a line that does 'touch /abc' and see if it
complains about not being able to create the file. If it can't, you have
to open the mountfs script and check it. Run the mountfs script manually
to see if there are problems reported.
 
> 2) Timezone.
> I created the link "localtime" to the correct timezone "Europe/Brussels".
> The system thinks that
> the system time is the GMT time but it is not. Does someone knows how I set
> the localtime correct, without changing the hardware clock.

LFS-2.3.6 fixes this by letting you create a setclock script which is
mainly used on systems that have the hardware clock set to localtime.

chapter6/steclock.sgml:

<sect1>
<title>Creating the setclock script</title>

<blockquote><literallayout>

#!/bin/sh
# Begin /etc/init.d/setclock

source /etc/init.d/functions
source /etc/sysconfig/clock

CLOCKPARAMS="--hctosys"

case "$UTC" in
	yes|true|1)
		CLOCKPARAMS="$CLOCKPARAMS -u"
		;;
esac

echo -n "Setting clock..."
/sbin/hwclock $CLOCKPARAMS
evaluate_retval

# End /etc/init.d/setclock

</literallayout></blockquote>

<sect2>
<title>Creating the /etc/sysconfig/clock file</title>

<para>
Create a new file <filename>/etc/sysconfig/clock</filename> containing
the following:
</para>

<blockquote><literallayout>

UTC=1

</literallayout></blockquote>

<para>
If your hardware clock (also known as BIOS or CMOS clock) is not set to
GMT time, than set the UTC variable in the /etc/sysconfig/clock file to
the value <emphasis>0</emphasis> (zero).
</para>

</sect2>

</sect1>


-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list