From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 28 22:51:44 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7DB3106566B for ; Mon, 28 Mar 2011 22:51:44 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8A1EE8FC08 for ; Mon, 28 Mar 2011 22:51:44 +0000 (UTC) Received: by iwn33 with SMTP id 33so5107596iwn.13 for ; Mon, 28 Mar 2011 15:51:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.111.228 with SMTP id t36mr4728066ibp.59.1301352702871; Mon, 28 Mar 2011 15:51:42 -0700 (PDT) Received: by 10.231.60.10 with HTTP; Mon, 28 Mar 2011 15:51:42 -0700 (PDT) In-Reply-To: <1301349824.26028.47.camel@localhost.localdomain> References: <8CDBBA132D81656-11D4-4261@web-mmc-d02.sysops.aol.com> <1301349824.26028.47.camel@localhost.localdomain> Date: Tue, 29 Mar 2011 00:51:42 +0200 Message-ID: From: Olivier Smedts To: Devin Teske Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: hackers@freebsd.org, dieterbsd@engineer.com Subject: Re: Keeping /etc/localtime up-to-date X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2011 22:51:44 -0000 2011/3/29 Devin Teske : > On Mon, 2011-03-28 at 16:52 -0400, dieterbsd@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 =A06 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 root@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. --=20 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 ASCII ribbon campaign ( ) e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \ =A0 "Il y a seulement 10 sortes de gens dans le monde : =A0 ceux qui comprennent le binaire, =A0 et ceux qui ne le comprennent pas."