Re: adding commands to installer image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 5, 2009 at 9:02 PM, Bryan J Smith<bjs@xxxxxxxxxx> wrote:
> On Wed, 2009-08-05 at 20:37 -0700, Larry Brigman wrote:
>> OK.  I don't run the RTC on localtime.  The vendor/manufacture ships the
>> system configured with the RTC set to some localtime (manufacture site).
>> ...
>> Understood.  The first time the box get a connection to a NTP server,
>> the RTC gets set to UTC.
>
> Which is a perfectly valid workflow.  As long as you install the system
> with the option that the RTC set to UTC, it will correct the issue.
>
> Unfortunately, you will still get future timestamps in the case of the
> western hemisphere, until the appropriate number of hours of the offset
> have passed.
>
>> I'm just trying to find a way to get the RTC close to UTC (within
>> about a minute) without manual intervention during the kickstart prior
>> to package installation if I have a vaild/active network
>> configuration.
>
> If you have HTTP, there's always the option to download a custom script
> and any necessary binaries into the environment, even in %pre IIRC.
> That's one way to address it.
I guess that a static version of ntpdate is possibly in order here.

>
> I'm surprised we're not including such stuff in busybox-anaconda?

Looked.  Only rdate is supported in busybox and rdate only supports localtime.
That was my first choice and may still do it since all our installs are PST.
The problem is that there is not an easy way to add 28800 to the
seconds and save
it the the hwclock.

--------------------------------------------------------------------------------------

I was working on this problem today and I think I have my solution
after much trial and error
with python.

1) use rdate to get localtime
2) use a three line python script to update it to UTC:
import time
t = time.time() + 28800l
print time.strftime('%m%d%H%M%Y',time.localtime(t))
3) send that output to busybox date.


Thanks everyone for your feedback.

_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/kickstart-list

[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux