Browse Source

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
Marek Marczykowski-Górecki 9 years ago
parent
commit
549761a144
1 changed files with 1 additions and 1 deletions
  1. 1 1
      vm-systemd/qubes-sysinit.sh

+ 1 - 1
vm-systemd/qubes-sysinit.sh

@@ -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