On Fri, 2007-03-16 at 07:12 -0600, Tom Patton wrote:
On Fri, 2007-03-16 at 13:14 +0100, Roger Oberholtzer wrote:
On Fri, 2007-03-16 at 11:42 +0100, Carlos E. R. wrote:
I'm not a script wizard, maybe someone will chime it...
Couldn't you parse a NEMA sentence to get "mmddhhmmyyyy.ss" to use for the argument to date? Use that in a script
Of course. As long as you track when the values are good. GPS data is notorious for this. This includes time. A proper solution would require that the operators ensure that they are in favorable conditions when the script is run. Programs like ntpd always run and can decide this. Also, most people with a computer have a fixed place to put the gps antenna that does not move. So they can choose a place with good reception. A moving vehicle is not so predictable. We have also considered using the radio beacon time signal for this.
parse nema rm /etc/adjtime date
hwclock --systohc hwclock --hctosys rm /etc/adjtime Then, on the next shutdown, a true /etc/adjtime will be written to the disk...so the next boot SHOULD be reasonably accurate. If they all have GPS available on the road, I'd run the script daily anyway. The script would have to run as root, of course.
Tom in NM
-- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Kapellgränd 7 P.O. Box 4205 SE-102 65 Stockholm, Sweden Tel: Int +46 8-615 60 20 Fax: Int +46 8-31 42 23 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org