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:
parent
7150587205
commit
95079d2426
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user