From 0247890bcb67bdf66ec6a5b3d6bee41625e7acad4d99bb4c7408660033eb1834 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 20 May 2013 21:33:04 +0000 Subject: [PATCH] Accepting request 176102 from home:elvigia:branches:Base:System - /etc/localtime must be a symlink to /usr/share/zoneinfo/$TIMEZONE so systemd-timedated and its command line tool timedatectl can work correctly. Yast already does the right thing. OBS-URL: https://build.opensuse.org/request/show/176102 OBS-URL: https://build.opensuse.org/package/show/Base:System/timezone?expand=0&rev=107 --- timezone.changes | 7 +++++++ timezone.spec | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/timezone.changes b/timezone.changes index 82df9ef..a18e392 100644 --- a/timezone.changes +++ b/timezone.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Apr 29 20:47:33 UTC 2013 - crrodriguez@opensuse.org + +- /etc/localtime must be a symlink to /usr/share/zoneinfo/$TIMEZONE + so systemd-timedated and its command line tool timedatectl + can work correctly. Yast already does the right thing. + ------------------------------------------------------------------- Sat Apr 20 16:41:02 UTC 2013 - crrodriguez@opensuse.org diff --git a/timezone.spec b/timezone.spec index 43fbda8..22ff50b 100644 --- a/timezone.spec +++ b/timezone.spec @@ -92,9 +92,7 @@ if [ -f /etc/sysconfig/clock ]; then . /etc/sysconfig/clock if [ -n "$TIMEZONE" -a -f /etc/localtime -a -f /usr/share/zoneinfo/$TIMEZONE ]; 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 - mv -f $new /etc/localtime + ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime else [ ! -f /etc/localtime ] || echo "WARNING: Not updating /etc/localtime with new zone file" >&2 fi