Re: [SLUG] First of a Dozen Questions - Follow-up

From: Ed Centanni (ecentan1@tampabay.rr.com)
Date: Wed Oct 24 2001 - 22:14:24 EDT


Bob Stia wrote:
>
> Hello Sluggers,
>
> Am still fighting my time problem. Am also subscribed to the SuSE
> mailing list and have posted to that list several times regards this
> problem. No luck. Others have this same problem. Nobody seems to have
> the answer. Been doing some analysis and record keeping on what is
> happening. Figured I would give the Sluggers another shot at it with
> a little more information. Following is a copy of a post that I made to
> the Suse list.
>

<snip>

Here's what I know about this situation.

1. There's a bug in SuSE's /etc/rc.d/boot script that will cause the
system clock to NOT be set to the hardware clock on boot. The bug has
been
there for several releases that I know of. (anybody at SuSE
listening?!)
At boot time the PATH doesn't seem to include /sbin and some commands
have to be invoked by
their full path name. Notice all the commands in the boot script that
begin with /sbin... Look in /etc/rc.d/boot for the shell variable
CLOCKCMD. You'll probably see something like:

CLOCKCMD=hwclock

change it to

CLOCKCMD=/sbin/hwclock

For good measure I also put the line "/sbin/hwclock --hctosys" in
/etc/rc.d/boot.local.

Alternatively (to changing your boot script) you can put a link in /bin
that points to hwclock or copy the executable from /sbin to /bin.

Now go into yast and go to "System Administration", then select "Change
Configuration File".
Scroll down or search for the GMT entry. This value of this entry is
given to the hwclock command as an additional argument and can be
anything that hwclock accepts. It should be blank (Current value
<> ) if your bios clock is set to local time. Be warned that hwclock
can get squirrely (not act as expected) even with no additional options
if you *previously* specified certain options. From the man pages:

 "If you specify neither --utc nor --localtime , the
 default is whichever was specified the last time
 hwclock was used to set the clock (i.e. hwclock was
 successfully run with the --set , --systohc , or
 --adjust options), as recorded in the adjtime file.
 If the adjtime file doesn't exist, the default is
 local time."

If in doubt delete the /etc/adjtime file so hwclock will re-create it
and reset it back to something sane.

2. If you're running KDE2 then the time setting utility (right click on
clock in the panel) assumes that your hardware clock is set to gmt (the
time zone not the variable). If your hardware clock is on local time
then set the time zone to "no selection". This should straighten up the
KDE2 clock.

I had similar time problems on three SuSE 7.1 installations and some
6.4's too. The above fixed them all.

Ed.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:45:54 EDT