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
This commit is contained in:
parent
0382f84eae
commit
549761a144
@ -88,7 +88,7 @@ fi
|
||||
if ! grep -rq "^/etc/timezone$" "${PROTECTED_FILE_LIST}" 2>/dev/null; then
|
||||
timezone=`$QDB_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