From 2a05f2ad80eda7ea3b525f11c96b9bd96506d513 Mon Sep 17 00:00:00 2001 From: Patrick McCarty Date: Mon, 25 Feb 2013 11:15:43 -0800 Subject: [PATCH] Reference $ZONE instead of $TIMEZONE in the %post section 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 | 3 +++ packaging/tzdata.spec | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 packaging/tzdata.changes diff --git a/packaging/tzdata.changes b/packaging/tzdata.changes new file mode 100644 index 0000000..0fdd867 --- /dev/null +++ b/packaging/tzdata.changes @@ -0,0 +1,3 @@ +* Mon Feb 25 2013 Patrick McCarty upstream/2012e@db3d9a9 +- (TZPC-1000) Reference $ZONE instead of $TIMEZONE in the %post section + diff --git a/packaging/tzdata.spec b/packaging/tzdata.spec index 47935f7..72f0976 100644 --- a/packaging/tzdata.spec +++ b/packaging/tzdata.spec @@ -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 -- 2.7.4