Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Mar 2011 16:04:37 -0700
From:      Doug Barton <dougb@FreeBSD.org>
To:        Olivier Smedts <olivier@gid0.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Using mergemaster to keep /etc/localtime updated
Message-ID:  <4D911405.3050906@FreeBSD.org>
In-Reply-To: <BANLkTik7Pk6kBrCZba9Gt4zPTXQuA7KL%2BQ@mail.gmail.com>
References:  <4D910084.1010304@FreeBSD.org> <BANLkTik7Pk6kBrCZba9Gt4zPTXQuA7KL%2BQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 03/28/2011 15:38, Olivier Smedts wrote:
> 2011/3/28 Doug Barton<dougb@freebsd.org>:
>> I'm starting a new thread since while the previous one contained a lot of
>> good information it was starting to get a big fragmented, and as someone
>> pointed out mergemaster is not a general solution so I want to focus on the
>> area that I'm actually responsible for. :)
>>
>> Having read everything in the thread (and thanks to all who contributed,
>> btw) my current plan is to add some code to the end (in the section that
>> deals with things like running cap_mkdb if you update login.conf) to do the
>> following. Please let me know if this sounds reasonable, or if I'm missing
>> something:
>>
>> 1. If /var/db/zoneinfo exists, check to see if /etc/localtime is the same as
>> /usr/share/`cat /var/db/zoneinfo` and if not, prompt the user to run
>> tzsetup.
>> 2. If /var/db/zoneinfo does not exist,
>
> and /etc/localtime is not a symlink to a tz file ?

Good point, I forgot to include that. :)

I should point out that I also forgot to specifically enumerate the case 
where there is no /etc/localtime file (i.e., the time zone is UTC). In 
that case mergemaster should do nothing.

>> check to see if kern.osreldate is
>> after the date that the code was added, and if so, prompt the user to run
>> tzsetup.
>
> So how would mergemaster behave after a fresh "make installworld
> distribution" in an empty DESTDIR ?

If you've already installed stuff, I don't see how DESTDIR could be 
empty. Or am I missing something?

> Isn't it supposed to do nothing in this case, because all should already be up-to-date ?

If there is no DESTDIR/etc/localtime, then yes, "do nothing" is the 
right answer, see above.


Thanks for the review,

Doug

-- 

	Nothin' ever doesn't change, but nothin' changes much.
			-- OK Go

	Breadth of IT experience, and depth of knowledge in the DNS.
	Yours for the right price.  :)  http://SupersetSolutions.com/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D911405.3050906>