Do not override file pointed by /etc/localtime symlink
On Fedora 21 (and probably others) /etc/localtime is no longer file
copy, but a symlink to original timezone file. Using `cp` to change
timezone here would override original file instead of just changing the
timezone.
Details:
https://groups.google.com/d/msgid/qubes-users/4a0de9457e08b93d1a39ac4cdbc6b632%40ruggedinbox.com
(cherry picked from commit 549761a144
)
This commit is contained in:
parent
4a3a53ae74
commit
1a2f283931
|
@ -82,7 +82,7 @@ fi
|
|||
if ! grep -rq "^/etc/timezone$" "${PROTECTED_FILE_LIST}" 2>/dev/null; then
|
||||
timezone=`$XS_READ qubes-timezone 2> /dev/null`
|
||||
if [ -n "$timezone" ]; then
|
||||
cp -p /usr/share/zoneinfo/$timezone /etc/localtime
|
||||
ln -sf ../usr/share/zoneinfo/$timezone /etc/localtime
|
||||
if [ -e /etc/debian_version ]; then
|
||||
echo "$timezone" > /etc/timezone
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue
Block a user