Welcome! Log In Create A New Profile

Advanced

How can I stop elive from syncing the RTC on halt???

Posted by jtwdyp 
How can I stop elive from syncing the RTC on halt???
March 11, 2010 11:14PM

I'm a multi-boot user who dislikes having certain tasks automated. I keep my RTC (the bios clock) set to local time. And I like to manage it manually from the bios utility.

I know that on boot any Linux will take it's initial time setting from the RTC, Then depending on NTP settings it might correct it's system clock from some server. That much is fine with me. But...

Somehow I managed to make sure Elive uses & expects local time rather than UTC. I know I edited /etc/timezone to say, "America/New_York" & that I did a:

cp /usr/share/zoneinfo/America/New_York /etc/localtime

Whatever else I did I can't quite remember. But the file: /etc/default/rcS does say: "UTC=no" But what I want to do is to prevent the system time from being written back to the RTC on system shutdown.

With Sabayon Linux there was a file with similar functionality to /etc/default/rcS called: /etc/conf.d/hwclock. Where in addition to setting 'clock="local"' to stop it from using UTC, there was also a setting 'clock_systohc="NO"' which stopped it from setting the Hardware Clock to the current System Time during shutdown.

With PCLinuxOS the file for this stuff is /etc/sysconfig/clock But it turned out that to stop PCLinuxOS from syncing the RTC I needed to comment out a line in /etc/init.d/halt which now says:
# [ -x /sbin/hwclock ] && action "Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS

I looked at /etc/init.d/halt in elive but didn't see anything like that line in it.

Could someone tell me how I can stop elive from writing to the hardware clock (RTC) at any time, excepting only that I should manually run "hwclock --systohc"??



--
jtwdyp
J(tWdy)P
Joe(theWordy)Philbrook

Re: How can I stop elive from syncing the RTC on halt???
March 22, 2010 07:32AM
Hi,
Maybe with rcconf which help in manaing boot & shutdown levels and services?
Ciao

MerMouY

Some of my websites:
Communautary website idea: [teams.elivecd.org]
Personnal website: [perso.youm.org]
Rwanda, french community: [rwandaises.fr]
YouM's streeshow: [youm.org]
Re: How can I stop elive from syncing the RTC on halt???
March 23, 2010 04:39AM

Quote
It would appear that on,March 22, 2010 07:32AM Mermouy did say:
Maybe with rcconf which help in manaing boot & shutdown levels and services?

Thanks for the suggestion Mermouy, I wasn't even aware of the existence of that tool before. But as far as I can see it's just a TUI frontend for update-rc.d... Handy though it might be for quickly turning services on and off, I don't believe that I can accomplish stopping Elive from syncing the hardware clock by disabling a service. I've already accomplished getting Elive to treat the time it finds there at boot time as my local EST/EDT time rather than UTC. And without running NTP that "almost" does what I want because the system clock is set to the hardware clock on boot, and if NTP doesn't correct the time, then when I eventually shut down the only difference between the time in the hardware clock and the time that gets written to, it is the theoretically small amount of drift caused by two different clocks gradually getting out of sync until at shutdown, Elive decides it's more accurate than the hardware clock and forces it's time to be "synced" to it's computed time during the shutdown script. But actually I'd like to run NTP to keep Elive's system clock more accurate, but for assorted personal reasons I do not want this corrected time to be written back into the hardware clock. I'd like Elive to treat it as a read-only device. If I were better at programming I might be able to find the actual calls that "sync" the hardware clock within the assorted rc scripts, and edit that function out of it. But I do not believe there is a separate daemon process (aka service) that's responsible for correcting the hardware clock to match the system time. So I don't see how update-rc.d or it's front end, rcconf can do this for me.

But like I said, "Thanks!" for the suggestion. And at least I learned of a potentially useful tool for quickly disabling and/or reenableing various daemon services, without having to study my update-rc.d notes every time...

--
jtwdyp
J(tWdy)P
Joe(theWordy)Philbrook

Sorry, only registered users may post in this forum.

Click here to login