Re: incorrect times displayed
On Thu, Apr 26, 2007 at 07:49:31 -0400, Steve Kleene wrote:
> On Wed, 25 Apr 2007 15:02:26 +0200, Florian Kulzer wrote:
> > OK, now I see that my previous messages were unclear. You should try it
> > like this:
> > hwclock --directisa --show
> > hwclock --directisa --set --date="23 Apr 2007 13:06:46"
> > Adding HWCLOCKPARS="--directisa" to /etc/default/rcS means that this
> > option is used when hwclock is called during boot-up and shutdown, but
> > it has no influence if you run the command directly.
> Those commands were successful. At the moment, I think I have the problem
> fixed. I had a little trouble with ntpd, but it kicked in when I stopped and
> restarted it. Then I set the hardware clock with:
> hwclock --directisa --hctosys
> It appears that this happens normally in /etc/init.d/hwclock.sh, which had
> the empty assignment
> I have switched this to
> It may be this needs to be set in hwclock.sh, not in /etc/default/rcS.
Both locations should work. If you change /etc/init.d/hwclock.sh then
you have to take care whenever the "util-linux" package is updated. The
change will be noticed and you will be asked if you want to keep your
version or install the package maintainer's new version. It is probably
better to install the new version and then change the "HWCLOCKPARS="
line again in the new file.
Using /etc/default/rcS avoids this issue. If you want to understand how
it works you have to look a bit further in hwclock.sh and you will see
This is the short way of writing "source /etc/default/rcS". At this
point /etc/default/rcS is read and all commands in it are executed as if
they had been included in hwclock.sh. This makes all the variable
assignments in rcS available to hwclock.sh. A number of the other
scripts in /etc/init.d also use /etc/default/rcS in that way. So this is
a more centralized mechanism and it saves you the trouble of having to
remember which init scripts you changed.
> keep an eye on things. Thanks for your help.
Sure, no problem.
Regards, | http://users.icfo.es/Florian.Kulzer