Keeping /etc/localtime up-to-date
Devin Teske
dteske at vicor.com
Mon Mar 28 19:33:23 UTC 2011
On Mon, 2011-03-28 at 11:48 -0700, Jason Helfman wrote:
> On Mon, Mar 28, 2011 at 02:22:01PM -0400, Maxim Khitrov thus spake:
> >Same here, though I'd be happy to change this habit if mergemaster
> >handled the updates for me.
> >
> This would be a good solution for source updates, but how would this work
> for binary upgrades via freebsd-update, as mergemaster is not used for this
> operation.
How we solved this back in 2006 when Congress altered the times that
Daylight Saving is observed, we pushed out an internal package that:
( Before Installation )
1a. If /etc/localtime is a symbolic link, proceed to installation (no
update needed).
1b. If /etc/localtime is a binary file,...
2. Compare /etc/localtime against each locale in /usr/share/zoneinfo
3. If you find a match, "remember" which timezone matched
( After Installation )
4. If /etc/localtime was binary and matched some locale
in /usr/share/zoneinfo, copy updated zoneinfo to /etc/localtime
(overwriting the current file).
--
Devin
>
> -jgh
>
More information about the freebsd-hackers
mailing list