Control: forwarded -1 https://github.com/xen-tools/xen-tools/issues/74
Control: tags -1 +patch
In hooks/common/60-copy-host-files /etc/localtime is copied without
taking into account that this is a symlink on the dom0 and the newly
created domU.
As the link in ${prefix}/etc/localtime at this point links to
/usr/share/zoneinfo/Etc/UTC the file on dom0 will be overwritten with
/etc/localtime.
A simple fix is to use 'cp -d' to copy /etc/localtime as a symlink.
The attached patch does this and was also suggested upstream in
https://github.com/xen-tools/xen-tools/pull/75
Best,
Valentin
diff --git a/hooks/common/60-copy-host-files b/hooks/common/60-copy-host-files
index d5b8d56..e5ed651 100755
--- a/hooks/common/60-copy-host-files
+++ b/hooks/common/60-copy-host-files
@@ -26,8 +26,8 @@ logMessage Script $0 starting
#
# Copy "required" files from our host.
#
-cp /etc/timezone ${prefix}/etc
-cp /etc/localtime ${prefix}/etc
+cp /etc/timezone ${prefix}/etc
+cp -d /etc/localtime ${prefix}/etc
#