]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Export TZ=/etc/localtime to fix timestamps.
authorVincent Bernat <bernat@luffy.cx>
Fri, 2 Dec 2011 06:35:02 +0000 (07:35 +0100)
committerVincent Bernat <bernat@luffy.cx>
Fri, 2 Dec 2011 06:35:02 +0000 (07:35 +0100)
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.
debian/init.d
redhat/lldpd.init
redhat/lldpd.init.suse

index aa44315deee9ae50b34f0e049ebe3f59b512368d..bee1b06846404c4ba15564622d329ee667632090 100644 (file)
@@ -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
 }
 
index 6f518b19f55f58f1f0d6a295f7e322038c40ae16..2202e2fe370ccaa49d901829a61ed41fa3b7bf0c 100644 (file)
@@ -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
 }
 
index ac51e22021be6a494dbf545ed993d9b3eef1b8b2..18be155dc8848e7bee15e48531ac07bde6c5a7fe 100644 (file)
@@ -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
 }