Re: Keeping /etc/localtime up-to-date

2011-03-31 Thread perryh
Matthias Andree matthias.and...@gmx.de wrote:

  If they're in the same physical FS there's no need for a symlink.
  You might as well use a hardlink.

 And then discuss how all the time zone configuration tools deal
 with /etc/localtime - truncate/overwrite, direct overwrite ...

In that case neither a symlink nor a hardlink is safe, regardless
of whether /etc and /usr/share/timezone are in the same FS.  Either
truncate/overwrite or direct overwrite will trash the target of a
symlink just as they would the file identified by a hardlink.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-29 Thread perryh
Matthias Andree matthias.and...@gmx.de wrote:
 Am 28.03.2011 19:57, schrieb dieter...@engineer.com:
  I have been running FreeBSD and NetBSD with /etc/localtime being
  a symlink for years and have not seen any problems as a result.

 In that case, /etc and /usr/share/timezone (or whatever) need to
 be in the same physical file system ...

If they're in the same physical FS there's no need for a symlink.
You might as well use a hardlink.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-29 Thread Matthias Andree
Am 29.03.2011 09:53, schrieb per...@pluto.rain.com:
 Matthias Andree matthias.and...@gmx.de wrote:
 Am 28.03.2011 19:57, schrieb dieter...@engineer.com:
 I have been running FreeBSD and NetBSD with /etc/localtime being
 a symlink for years and have not seen any problems as a result.

 In that case, /etc and /usr/share/timezone (or whatever) need to
 be in the same physical file system ...
 
 If they're in the same physical FS there's no need for a symlink.
 You might as well use a hardlink.

And then discuss how all the time zone configuration tools deal with
/etc/localtime - truncate/overwrite, direct overwrite,
rename-a-replacement-file and all that.  No.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread David Wolfskill
On Sun, Mar 27, 2011 at 09:38:29PM -0400, Ed Maste wrote:
 On Sun, Mar 27, 2011 at 03:27:32PM -0700, David Wolfskill wrote:
 
  There are other ways to do it, of course -- e.g., the first time the
  utility is run, it could actually ask, but then cache the information in
  some place so it could look there first (and if it finds a cached
  answer, avoid asking again unless it's told to ignore the cache -- as
  might be reasonable if the machine is moved to a different time zone.
 
 That's what tzsetup does in HEAD - the name of the selected timezone file
 is stored in /var/db/zoneinfo, and tzsetup -r can be used to copy in an
 updated file:
 
   -r  Reinstall the zoneinfo file installed last time. The
   name is obtained from /var/db/zoneinfo.
 
 It looks like this hasn't been MFC'd, although I'm not sure why.  The
 change came in from svn rev 198267 by edwin (CC'd).

Thanks for pointing that out -- I had failed to consider that the
behavior might have changed in head.

It does seem to me that an MFC would be useful and harmless, based only
on the above information.

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpTOjYNMzeLM.pgp
Description: PGP signature


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread dieterbsd
 And while I (think I) recall that the equivalent of /etc/localtime
 was implemented in some version of SunOS many years ago as a symlink,
 I believe that approach could be problematic for FreeBSD, as it
 could impose some unintended requirements on some of the start-up
 scripts.

I have been running FreeBSD and NetBSD with /etc/localtime being
a symlink for years and have not seen any problems as a result.



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Garrett Cooper
On Mon, Mar 28, 2011 at 10:57 AM,  dieter...@engineer.com wrote:
 And while I (think I) recall that the equivalent of /etc/localtime
 was implemented in some version of SunOS many years ago as a symlink,
 I believe that approach could be problematic for FreeBSD, as it
 could impose some unintended requirements on some of the start-up
 scripts.

 I have been running FreeBSD and NetBSD with /etc/localtime being
 a symlink for years and have not seen any problems as a result.

+1. Many Linux distros do the same thing as well (Gentoo is just one example).
Thanks,
-Garrett
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Devin Teske
Sent from my iPad

On Mar 28, 2011, at 10:57 AM, dieter...@engineer.com wrote:

 And while I (think I) recall that the equivalent of /etc/localtime
 was implemented in some version of SunOS many years ago as a symlink,
 I believe that approach could be problematic for FreeBSD, as it
 could impose some unintended requirements on some of the start-up
 scripts.
 
 I have been running FreeBSD and NetBSD with /etc/localtime being
 a symlink for years and have not seen any problems as a result.
 

The one (and only) problem that I've seen from using a symlink for 
/etc/localtime is that -- since the /usr partition is not mounted early-on -- 
boot messages get logged in GMT offset until /usr is mounted.

However, some simply ignore this.
--
Devin

 
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Maxim Khitrov
On Mon, Mar 28, 2011 at 2:10 PM, Garrett Cooper gcoo...@freebsd.org wrote:
 On Mon, Mar 28, 2011 at 10:57 AM,  dieter...@engineer.com wrote:
 And while I (think I) recall that the equivalent of /etc/localtime
 was implemented in some version of SunOS many years ago as a symlink,
 I believe that approach could be problematic for FreeBSD, as it
 could impose some unintended requirements on some of the start-up
 scripts.

 I have been running FreeBSD and NetBSD with /etc/localtime being
 a symlink for years and have not seen any problems as a result.

 +1. Many Linux distros do the same thing as well (Gentoo is just one example).
 Thanks,
 -Garrett

Same here, though I'd be happy to change this habit if mergemaster
handled the updates for me.

If you do end up using /var/db/zoneinfo in mergemaster, keep two things in mind:

1. /var/db/zoneinfo may not exist because tzsetup was never used
(/etc/localtime may or may not exist).
2. /etc/localtime may be a symlink to /usr/share/zoneinfo/...

In the first case, you would need to ask the user which zoneinfo file
to use, or just run tzsetup for them. In the second case, you should
confirm that the user wants to replace the symlink with a copy. In
both cases, verify that /var/db/zoneinfo reflects current
configuration (create it, if necessary).

- Max
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Olivier Smedts
2011/3/28  dieter...@engineer.com:
 And while I (think I) recall that the equivalent of /etc/localtime
 was implemented in some version of SunOS many years ago as a symlink,
 I believe that approach could be problematic for FreeBSD, as it
 could impose some unintended requirements on some of the start-up
 scripts.

 I have been running FreeBSD and NetBSD with /etc/localtime being
 a symlink for years and have not seen any problems as a result.

The symlink's target is in /usr (/usr/share/zoneinfo/), which is
separated in the default partition layout.
But both /etc/rc.d/adjkerntz and /usr/src/UPDATING require mounting
filesystems before calling adjkerntz, so it should be ok.

-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: oliv...@gid0.org        - against HTML email  vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Brian Reichert
On Mon, Mar 28, 2011 at 11:10:42AM -0700, Garrett Cooper wrote:
 On Mon, Mar 28, 2011 at 10:57 AM,  dieter...@engineer.com wrote:
  I have been running FreeBSD and NetBSD with /etc/localtime being
  a symlink for years and have not seen any problems as a result.
 
 +1. Many Linux distros do the same thing as well (Gentoo is just one example).

RedHat is a counter-example.

Parts of the kernel are not timezone aware, and seem to be hard-coded
to use whatever TZ the hardware clock is in.  The symptom I was
running into was that the kernel's timestamps were waffling
back-and-forth during the boot process.

I was making use of a symlink, but the timezone data was on a
different partition from the root parition.  RedHat's support
officially said don't use a symlink, as any process started before
the 'real' TZ files were available would reckon time differently
when printing timestamps.

Lots of people got bit by this:

  https://bugzilla.redhat.com/show_bug.cgi?id=91228

YMMV.

 Thanks,
 -Garrett
 ___
 freebsd-hackers@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
 To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org

-- 
Brian Reichert  reich...@numachi.com
BSD admin/developer at large
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Jason Helfman

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.

-jgh

--
Jason Helfman
System Administrator
experts-exchange.com
http://www.experts-exchange.com/M_4830110.html
E4AD 7CF1 1396 27F6 79DD  4342 5E92 AD66 8C8C FBA5
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Devin Teske
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
 


___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Matthias Andree
Am 28.03.2011 19:57, schrieb dieter...@engineer.com:
 And while I (think I) recall that the equivalent of /etc/localtime
 was implemented in some version of SunOS many years ago as a symlink,
 I believe that approach could be problematic for FreeBSD, as it
 could impose some unintended requirements on some of the start-up
 scripts.
 
 I have been running FreeBSD and NetBSD with /etc/localtime being
 a symlink for years and have not seen any problems as a result.

In that case, /etc and /usr/share/timezone (or whatever) need to be in
the same physical file system.  Adds interesting software effects for
those file systems where a directory is a filesystem with its own dev
and thereabouts, such as AFS.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread dieterbsd

And while I (think I) recall that the equivalent of /etc/localtime
was implemented in some version of SunOS many years ago as a 

symlink,

I believe that approach could be problematic for FreeBSD, as it
could impose some unintended requirements on some of the start-up
scripts.


I have been running FreeBSD and NetBSD with /etc/localtime being
a symlink for years and have not seen any problems as a result.


The one (and only) problem that I've seen from using a symlink for
/etc/localtime is that -- since the /usr partition is not mounted
early-on -- boot messages get logged in GMT offset until /usr is 

mounted.


However, some simply ignore this.


What boot messages are these?

grep 2011 /var/run/dmesg.boot
Copyright (c) 1992-2011 The FreeBSD Project.
FreeBSD 8.2-RELEASE #9: Sun Mar  6 18:47:36 pst 2011



___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Doug Barton

On 03/27/2011 18:38, Ed Maste wrote:

That's what tzsetup does in HEAD - the name of the selected timezone file
is stored in /var/db/zoneinfo, and tzsetup -r can be used to copy in an
updated file:

   -r  Reinstall the zoneinfo file installed last time. The
   name is obtained from /var/db/zoneinfo.

It looks like this hasn't been MFC'd, although I'm not sure why.  The
change came in from svn rev 198267 by edwin (CC'd).


Edwin,

Any reason not to MFC this?


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/

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Devin Teske
On Mon, 2011-03-28 at 16:52 -0400, dieter...@engineer.com wrote:
  And while I (think I) recall that the equivalent of /etc/localtime
  was implemented in some version of SunOS many years ago as a 
 symlink,
  I believe that approach could be problematic for FreeBSD, as it
  could impose some unintended requirements on some of the start-up
  scripts.
 
  I have been running FreeBSD and NetBSD with /etc/localtime being
  a symlink for years and have not seen any problems as a result.
 
  The one (and only) problem that I've seen from using a symlink for
  /etc/localtime is that -- since the /usr partition is not mounted
  early-on -- boot messages get logged in GMT offset until /usr is 
 mounted.
 
  However, some simply ignore this.
 
 What boot messages are these?

The messages generated during boot -- see /var/log/messages.


 grep 2011 /var/run/dmesg.boot

Those aren't the boot messages I'm referring to (and by convention, I
would call those the kernel boot messages as only the kernel messages
are found there).

 Copyright (c) 1992-2011 The FreeBSD Project.
 FreeBSD 8.2-RELEASE #9: Sun Mar  6 18:47:36 pst 2011

Huh? Please help me understand why you'd grep for 2011 in the context
of this topic (timezone differences).

Here's an impirical test:
1. Put your BIOS into GMT
2. Make /etc/localtime a symbolic link
to /usr/share/zoneinfo/America/Los_Angeles
3. Reboot

In our experience, the Regents of the University of California message
is logged to /var/log/messages in GMT and subsequent messages (produced
after /usr is mounted) are logged in the desired timezone.

NOTE: This assumes that / and /usr are separate partitions.
-- 
Devin

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Olivier Smedts
2011/3/29 Devin Teske dte...@vicor.com:
 On Mon, 2011-03-28 at 16:52 -0400, dieter...@engineer.com wrote:
  And while I (think I) recall that the equivalent of /etc/localtime
  was implemented in some version of SunOS many years ago as a
 symlink,
  I believe that approach could be problematic for FreeBSD, as it
  could impose some unintended requirements on some of the start-up
  scripts.
 
  I have been running FreeBSD and NetBSD with /etc/localtime being
  a symlink for years and have not seen any problems as a result.
 
  The one (and only) problem that I've seen from using a symlink for
  /etc/localtime is that -- since the /usr partition is not mounted
  early-on -- boot messages get logged in GMT offset until /usr is
 mounted.
 
  However, some simply ignore this.

 What boot messages are these?

 The messages generated during boot -- see /var/log/messages.


 grep 2011 /var/run/dmesg.boot

 Those aren't the boot messages I'm referring to (and by convention, I
 would call those the kernel boot messages as only the kernel messages
 are found there).

 Copyright (c) 1992-2011 The FreeBSD Project.
 FreeBSD 8.2-RELEASE #9: Sun Mar  6 18:47:36 pst 2011

 Huh? Please help me understand why you'd grep for 2011 in the context
 of this topic (timezone differences).

 Here's an impirical test:
 1. Put your BIOS into GMT
 2. Make /etc/localtime a symbolic link
 to /usr/share/zoneinfo/America/Los_Angeles
 3. Reboot

 In our experience, the Regents of the University of California message
 is logged to /var/log/messages in GMT and subsequent messages (produced
 after /usr is mounted) are logged in the desired timezone.

 NOTE: This assumes that / and /usr are separate partitions.

Not for me (BIOS clock set to UTC) :
% uname -a
FreeBSD q.gid0.org 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r220114: Mon Mar
28 23:42:11 CEST 2011 r...@q.gid0.org:/usr/obj/usr/src/sys/QUAD
amd64
% date
mar 29 mar 2011 00:41:41 CEST
% uptime
 0:41  up 30 mins, 3 users, load averages: 0,06 0,06 0,07
% ls -l /etc/localtime
lrwxr-xr-x  1 root  wheel  32 29 jui  2008 /etc/localtime@ -
/usr/share/zoneinfo/Europe/Paris
% mount
tank/freebsd on / (zfs, local, noatime, nfsv4acls)
[...]
tank/freebsd/usr on /usr (zfs, local, noatime, nfsv4acls)
[...]
% grep -i regents /var/log/messages
Mar 29 00:12:08 q kernel: The Regents of the University of California.
All rights reserved.
% tail -n 1 /var/log/messages
Mar 29 00:12:08 q kernel: kbd0 at ukbd0

I don't think this content is added to /var/log/messages during boot,
because the kernel doesn't have access to the log file (and if /usr is
not mounted, neither is /var). I thought the kernel messages were
saved in memory (system message buffer), and only after boot (and
filesystems mounted, and syslogd started) were they dumped to a file.


-- 
Olivier Smedts                                                 _
                                        ASCII ribbon campaign ( )
e-mail: oliv...@gid0.org        - against HTML email  vCards  X
www: http://www.gid0.org    - against proprietary attachments / \

  Il y a seulement 10 sortes de gens dans le monde :
  ceux qui comprennent le binaire,
  et ceux qui ne le comprennent pas.
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Devin Teske
On Tue, 2011-03-29 at 00:51 +0200, Olivier Smedts wrote:

 2011/3/29 Devin Teske dte...@vicor.com:
  On Mon, 2011-03-28 at 16:52 -0400, dieter...@engineer.com wrote:
   And while I (think I) recall that the equivalent of /etc/localtime
   was implemented in some version of SunOS many years ago as a
  symlink,
   I believe that approach could be problematic for FreeBSD, as it
   could impose some unintended requirements on some of the start-up
   scripts.
  
   I have been running FreeBSD and NetBSD with /etc/localtime being
   a symlink for years and have not seen any problems as a result.
  
   The one (and only) problem that I've seen from using a symlink for
   /etc/localtime is that -- since the /usr partition is not mounted
   early-on -- boot messages get logged in GMT offset until /usr is
  mounted.
  
   However, some simply ignore this.
 
  What boot messages are these?
 
  The messages generated during boot -- see /var/log/messages.
 
 
  grep 2011 /var/run/dmesg.boot
 
  Those aren't the boot messages I'm referring to (and by convention, I
  would call those the kernel boot messages as only the kernel messages
  are found there).
 
  Copyright (c) 1992-2011 The FreeBSD Project.
  FreeBSD 8.2-RELEASE #9: Sun Mar  6 18:47:36 pst 2011
 
  Huh? Please help me understand why you'd grep for 2011 in the context
  of this topic (timezone differences).
 
  Here's an impirical test:
  1. Put your BIOS into GMT
  2. Make /etc/localtime a symbolic link
  to /usr/share/zoneinfo/America/Los_Angeles
  3. Reboot
 
  In our experience, the Regents of the University of California message
  is logged to /var/log/messages in GMT and subsequent messages (produced
  after /usr is mounted) are logged in the desired timezone.
 
  NOTE: This assumes that / and /usr are separate partitions.
 
 Not for me (BIOS clock set to UTC) :
 % uname -a
 FreeBSD q.gid0.org 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r220114: Mon Mar
 28 23:42:11 CEST 2011 r...@q.gid0.org:/usr/obj/usr/src/sys/QUAD
 amd64
 % date
 mar 29 mar 2011 00:41:41 CEST
 % uptime
  0:41  up 30 mins, 3 users, load averages: 0,06 0,06 0,07
 % ls -l /etc/localtime
 lrwxr-xr-x  1 root  wheel  32 29 jui  2008 /etc/localtime@ -
 /usr/share/zoneinfo/Europe/Paris
 % mount
 tank/freebsd on / (zfs, local, noatime, nfsv4acls)
 [...]
 tank/freebsd/usr on /usr (zfs, local, noatime, nfsv4acls)
 [...]
 % grep -i regents /var/log/messages
 Mar 29 00:12:08 q kernel: The Regents of the University of California.
 All rights reserved.
 % tail -n 1 /var/log/messages
 Mar 29 00:12:08 q kernel: kbd0 at ukbd0
 
 I don't think this content is added to /var/log/messages during boot,
 because the kernel doesn't have access to the log file (and if /usr is
 not mounted, neither is /var). I thought the kernel messages were
 saved in memory (system message buffer), and only after boot (and
 filesystems mounted, and syslogd started) were they dumped to a file.


I'm thinking that this must have changed from FreeBSD-4.8 onward. I
wasn't personally involved on this one, but did hear from my boss that
several sites reported this (but those sites were running FreeBSD 4.8
and 4.11). It's quite possible that the problem was fixed in later
releases.

In which case, I can jump up and down for joy and tell my boss that it's
once-again kosher to set /etc/localtime as a symbolic link.
--
Devin
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Doug Barton

On 03/28/2011 16:22, Devin Teske wrote:

In which case, I can jump up and down for joy and tell my boss that it's
once-again kosher to set /etc/localtime as a symbolic link.


It has always been true that the only safe way to make /etc/localtime 
a symlink is to have / and /usr on the same filesystem. This point has 
been repeated several times in this thread so far, hopefully this can be 
the last? :)



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/

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-28 Thread Edwin Groothuis
Hello Doug,

I think it got lost in the busy/dark part of my life last year.
Feel free to do it, the code is not spectacular or dramatic.
If not done when I go home I will do it tonight on my way back from
work.

Edwin
 
 -- Edwin Groothuis ed...@mavetju.org 

- Original Message -
From: Doug Barton 
To:Ed Maste 
Cc:David Wolfskill , , 
Sent:Mon, 28 Mar 2011 14:11:42 -0700
Subject:Re: Keeping /etc/localtime up-to-date

 On 03/27/2011 18:38, Ed Maste wrote:
  That's what tzsetup does in HEAD - the name of the selected
timezone file
  is stored in /var/db/zoneinfo, and tzsetup -r can be used to copy
in an
  updated file:
 
  -r Reinstall the zoneinfo file installed last time. The
  name is obtained from /var/db/zoneinfo.
 
  It looks like this hasn't been MFC'd, although I'm not sure why.
The
  change came in from svn rev 198267 by edwin (CC'd).

 Edwin,

 Any reason not to MFC this?

 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/ [1]



Links:
--
[1] http://SupersetSolutions.com/

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-27 Thread Doug Barton

On 03/27/2011 08:38, David Wolfskill wrote:

It would (in principle) be possible to teach mergemaster(8) how to
do this (possibly by including a cookie in ~/.mergemasterrc or
/etc/mergemaster.rc to tell it what the reference zoneinfo pathname
is), but this type of approach seems sufficiently different from
(the bulk of?) what mergemaster does currently that I'm unconvinced
that this is reasonable, let alone ideal.


Yeah, I wouldn't be enthusiastic about this. :)


So it seems to me that requirements would be:
* The content of /etc/localtime must provide the appropriate
   zoneinfo information, even when/usr/share/zoneinfo/* has been
   modified (or shortly thereafter, in concert with make installworld).


This is more along the lines of something that would be easy to work 
with in mergemaster. If I can tell what file in /usr/share/zoneinfo to 
compare /etc/localtime to (ideally with fully path), I'm happy to 
provide a mechanism in mergemaster to make sure it stays up to date.



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/

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-27 Thread David Wolfskill
On Sun, Mar 27, 2011 at 01:31:22PM -0700, Doug Barton wrote:
 On 03/27/2011 08:38, David Wolfskill wrote:
 It would (in principle) be possible to teach mergemaster(8) how to
 do this (possibly by including a cookie in ~/.mergemasterrc or
 /etc/mergemaster.rc to tell it what the reference zoneinfo pathname
 is), but this type of approach seems sufficiently different from
 (the bulk of?) what mergemaster does currently that I'm unconvinced
 that this is reasonable, let alone ideal.
 
 Yeah, I wouldn't be enthusiastic about this. :)

Indeed.

 So it seems to me that requirements would be:
 * The content of /etc/localtime must provide the appropriate
zoneinfo information, even when/usr/share/zoneinfo/* has been
modified (or shortly thereafter, in concert with make installworld).
 
 This is more along the lines of something that would be easy to work 
 with in mergemaster.

Hmm... OK

 If I can tell what file in /usr/share/zoneinfo to 
 compare /etc/localtime to (ideally with fully path), I'm happy to 
 provide a mechanism in mergemaster to make sure it stays up to date.

Well, that's the function that the (hypothetical) cookie in
~/.mergemasterrc or /etc/mergemaster.rc was intended to to provide.
It could be a simple shell variable, for example.

There are other ways to do it, of course -- e.g., the first time the
utility is run, it could actually ask, but then cache the information in
some place so it could look there first (and if it finds a cached
answer, avoid asking again unless it's told to ignore the cache -- as
might be reasonable if the machine is moved to a different time zone.

But I tend to favor simplicity.  :-)

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
Depriving a girl or boy of an opportunity for education is evil.

See http://www.catwhisker.org/~david/publickey.gpg for my public key.


pgpZhc53K08HH.pgp
Description: PGP signature


Re: Keeping /etc/localtime up-to-date

2011-03-27 Thread Ed Maste
On Sun, Mar 27, 2011 at 03:27:32PM -0700, David Wolfskill wrote:

 There are other ways to do it, of course -- e.g., the first time the
 utility is run, it could actually ask, but then cache the information in
 some place so it could look there first (and if it finds a cached
 answer, avoid asking again unless it's told to ignore the cache -- as
 might be reasonable if the machine is moved to a different time zone.

That's what tzsetup does in HEAD - the name of the selected timezone file
is stored in /var/db/zoneinfo, and tzsetup -r can be used to copy in an
updated file:

  -r  Reinstall the zoneinfo file installed last time. The
  name is obtained from /var/db/zoneinfo.

It looks like this hasn't been MFC'd, although I'm not sure why.  The
change came in from svn rev 198267 by edwin (CC'd).

-Ed
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-27 Thread Tim Kientzle
On Mar 27, 2011, at 1:31 PM, Doug Barton wrote:
 On 03/27/2011 08:38, David Wolfskill wrote:
 So it seems to me that requirements would be:
 * The content of /etc/localtime must provide the appropriate
   zoneinfo information, even when/usr/share/zoneinfo/* has been
   modified (or shortly thereafter, in concert with make installworld).
 
 This is more along the lines of something that would be easy to work with in 
 mergemaster. If I can tell what file in /usr/share/zoneinfo to compare 
 /etc/localtime to (ideally with fully path), I'm happy to provide a mechanism 
 in mergemaster to make sure it stays up to date.


The best fix is to first add the ability for date(1)
to print out the current timezone name.
(E.g., America/Los_Angeles)  Then it's trivial
for mergemaster to update /etc/localtime; just
ask date(1) for the timezone name and copy
the correct one over /etc/localtime.

Unfortunately, I think it's currently impossible
for date(1) to do this because the zoneinfo
files don't store that information.  This  is the real
reason Solaris uses a symlink; the value of the
symlink gives you the timezone name.

FWIW, mergemaster is not the only program
that would benefit from a canonical way to obtain
the name of the current timezone.

Cheers,

Tim

___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org


Re: Keeping /etc/localtime up-to-date

2011-03-27 Thread poyopoyo
At Sun, 27 Mar 2011 13:31:22 -0700,
Doug Barton wrote:
 This is more along the lines of something that would be easy to work 
 with in mergemaster. If I can tell what file in /usr/share/zoneinfo to 
 compare /etc/localtime to (ideally with fully path), I'm happy to 
 provide a mechanism in mergemaster to make sure it stays up to date.

tzsetup(8) creates /var/db/zoneinfo which contains path to the installed
zoneinfo file relative to /usr/share/zineinfo/.

$ cat /var/db/zoneinfo
Asia/Tokyo
$ md5 -q /etc/localtime /usr/share/zoneinfo/$(cat /var/db/zoneinfo)
f17769e8eb35e7a08cfedfe9b2f6b5ef
f17769e8eb35e7a08cfedfe9b2f6b5ef

-- 
kuro
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to freebsd-hackers-unsubscr...@freebsd.org