SHA256
1
0
forked from pool/timezone

- restrict symlink change to systemd distros

OBS-URL: https://build.opensuse.org/package/show/Base:System/timezone?expand=0&rev=112
This commit is contained in:
Dirk Mueller 2013-07-08 17:28:20 +00:00 committed by Git OBS Bridge
parent 7150587205
commit 95079d2426
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jul 8 17:28:01 UTC 2013 - dmueller@suse.com
- restrict symlink change to systemd distros
-------------------------------------------------------------------
Mon Jul 8 16:53:30 UTC 2013 - dmueller@suse.com

View File

@ -92,7 +92,13 @@ if [ -f /etc/sysconfig/clock ];
then
. /etc/sysconfig/clock
if [ -n "$TIMEZONE" -a -f /etc/localtime -a -f /usr/share/zoneinfo/$TIMEZONE ]; then
ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
%if 0%{?suse_version} >= 1230
ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime
%else
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
%endif
else
[ ! -f /etc/localtime ] || echo "WARNING: Not updating /etc/localtime with new zone file" >&2
fi