From: Vincent Bernat Date: Fri, 2 Dec 2011 06:35:02 +0000 (+0100) Subject: Export TZ=/etc/localtime to fix timestamps. X-Git-Tag: 0.5.6~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dc5e2a1dbb0e101f38450a4a6006c14f38dac711;p=thirdparty%2Flldpd.git Export TZ=/etc/localtime to fix timestamps. While chrooted, syslog timestamps does not respect the configured timezone despite the copy of /etc/localtime inside the chroot. Setting TZ variable seems to fix this problem. Closes: #13. --- diff --git a/debian/init.d b/debian/init.d index aa44315d..bee1b068 100644 --- a/debian/init.d +++ b/debian/init.d @@ -36,6 +36,7 @@ do_chroot() [ -d $CHROOT/etc ] || mkdir -p $CHROOT/etc [ -f $CHROOT/etc/localtime ] || [ ! -f /etc/localtime ] || \ cp /etc/localtime $CHROOT/etc/localtime + export TZ=/etc/localtime umask $oldumask } diff --git a/redhat/lldpd.init b/redhat/lldpd.init index 6f518b19..2202e2fe 100644 --- a/redhat/lldpd.init +++ b/redhat/lldpd.init @@ -39,6 +39,7 @@ build_chroot() [ -d $chroot/etc ] || mkdir -p $chroot/etc [ -f $chroot/etc/localtime ] || [ ! -f /etc/localtime ] || \ cp /etc/localtime $chroot/etc/localtime + export TZ=/etc/localtime umask $oldumask } diff --git a/redhat/lldpd.init.suse b/redhat/lldpd.init.suse index ac51e220..18be155d 100644 --- a/redhat/lldpd.init.suse +++ b/redhat/lldpd.init.suse @@ -42,6 +42,7 @@ build_chroot() [ -d $chroot/etc ] || mkdir -p $chroot/etc [ -f $chroot/etc/localtime ] || [ ! -f /etc/localtime ] || \ cp /etc/localtime $chroot/etc/localtime + export TZ=/etc/localtime umask $oldumask }