Reference $ZONE instead of $TIMEZONE in the %post section
authorPatrick McCarty <patrick.mccarty@linux.intel.com>
Mon, 25 Feb 2013 19:15:43 +0000 (11:15 -0800)
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>
Tue, 4 Nov 2014 14:02:36 +0000 (15:02 +0100)
During image creation, MIC sets the $ZONE variable in
/etc/sysconfig/clock to represent the local time zone, but the %post
section of tzdata references $TIMEZONE instead of $ZONE.

This commit fixes the issue.

Change-Id: I2ccfe2fb302bb6a18e683aa145a8d3551a957dcf

packaging/tzdata.changes [new file with mode: 0644]
packaging/tzdata.spec

diff --git a/packaging/tzdata.changes b/packaging/tzdata.changes
new file mode 100644 (file)
index 0000000..0fdd867
--- /dev/null
@@ -0,0 +1,3 @@
+* Mon Feb 25 2013 Patrick McCarty <patrick.mccarty@linux.intel.com> upstream/2012e@db3d9a9
+- (TZPC-1000) Reference $ZONE instead of $TIMEZONE in the %post section
+
index 47935f7..72f0976 100644 (file)
@@ -59,9 +59,9 @@ rm -rf %{buildroot}
 if [ -f /etc/sysconfig/clock ];
 then
     . /etc/sysconfig/clock
-    if [ -n "$TIMEZONE" -a -f /etc/localtime -a -f /usr/share/zoneinfo/$TIMEZONE ]; then
+    if [ -n "$ZONE" -a -f /etc/localtime -a -f /usr/share/zoneinfo/$ZONE ]; then
        new=$(mktemp /etc/localtime.XXXXXXXX) || exit 1
-       cp -l /usr/share/zoneinfo/$TIMEZONE $new 2>/dev/null || cp -fp /usr/share/zoneinfo/$TIMEZONE $new
+       cp -l /usr/share/zoneinfo/$ZONE $new 2>/dev/null || cp -fp /usr/share/zoneinfo/$ZONE $new
        mv -f $new /etc/localtime
     else
        [ ! -f /etc/localtime ] || echo "WARNING: Not updating /etc/localtime with new zone file" >&2