From: Arkadiusz Miƛkiewicz Date: Mon, 12 Oct 2015 06:44:38 +0000 (+0200) Subject: - rel 3; java relies on /etc/localtime being symlink for timezone detection, so make... X-Git-Tag: auto/th/tzdata-2015f-3 X-Git-Url: http://git.pld-linux.org/?p=packages%2Ftzdata.git;a=commitdiff_plain;h=81d0589 - rel 3; java relies on /etc/localtime being symlink for timezone detection, so make it symlink for systems not using shared /usr (not great but well...) --- diff --git a/timezone.init b/timezone.init index 5b52348..ba0931b 100755 --- a/timezone.init +++ b/timezone.init @@ -35,7 +35,11 @@ start() { MESSAGE=$(nls 'Setting time zone information (%s)' "$TIMEZONE") - run_cmd "$MESSAGE" cp -af "$ZONE_FILE" /etc/localtime + if [ -n "$(awk '$2 == "/usr" { print $2 }' /proc/mounts 2> /dev/null)" ]; then + run_cmd "$MESSAGE" cp -af "$ZONE_FILE" /etc/localtime + else + run_cmd "$MESSAGE" ln -sf "$ZONE_FILE" /etc/localtime + fi RETVAL=$? restorecon /etc/localtime >/dev/null 2>&1 else diff --git a/tzdata.spec b/tzdata.spec index 7fd19c2..5b687a0 100644 --- a/tzdata.spec +++ b/tzdata.spec @@ -15,7 +15,7 @@ Summary: Timezone data Summary(pl.UTF-8): Dane o strefach czasowych Name: tzdata Version: %{tzdata_ver} -Release: 2 +Release: 3 License: Public Domain (database), BSD/LGPL v2.1+ (code/test suite) Group: Base # The tzdata-base-0.tar.bz2 is a simple building infrastructure and