From 549761a1442004d74c55dc2fd704cf276d94b46a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 23 Jun 2015 19:56:51 +0200 Subject: [PATCH] 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 --- vm-systemd/qubes-sysinit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm-systemd/qubes-sysinit.sh b/vm-systemd/qubes-sysinit.sh index 3c2cd20..9f808b7 100755 --- a/vm-systemd/qubes-sysinit.sh +++ b/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