Re: Setting time

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

 



On Thu, 4 Sep 2003, Jesse Keating wrote:

>My question is; is there a way to use ntpdate or ntp to set the time on
>the box during the install?

%pre could do it.

>Sure I can do it in %post right before my tar part, but I wonder what
>this will do to the timestamps on all the files installed via RPM and
>various post sections of rpm installation.

Files inside RPM packages have their own timestamps, which are
preserved; an .rpm is a glorified cpio archive.

Files created/altered during [rpm] postinstall scripts would have
timestamps based on the system clock, which could be inaccurate. Other
than tidiness and order, I can't think of any reason that such files
would *need* to be accurately timestamped. Perhaps some of the derived
files like /etc/ld.so.cache and /etc/aliases.db...

>Where does anaconda get it's time from, the BIOS?

I assume so. The system clock is the only time resource guaranteed to
be available.

>And when rpms are installed in the sysimage/ area, does it also get
>it's time from the bios?

Err, RPMs are installed *from* the sysimage area. The dates on the .rpm
files themselves is not significant.

>Is there any way to adjust this prior to the rpms being installed, or
>should I even worry about it?

Either create and make available ntpdate or rdate to the kickstart
client, or use the binaries already available from busybox (nc, date),
and do something is a %pre scripts.

The full solution is left as an exercise for the interested reader.


Cheers,
Phil




[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