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
--- /dev/null
+* 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
+
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