dom0/vm: set VM timezone same as in dom0 - on VM boot (#413)

This commit is contained in:
Marek Marczykowski 2012-01-18 16:59:58 +01:00
parent e409cfe766
commit f55fe8a118
2 changed files with 13 additions and 0 deletions

View File

@ -29,6 +29,13 @@ start()
(grep -v "\<$name\>" /etc/hosts; echo "127.0.0.1 $name") > /etc/hosts
fi
timezone=`/usr/bin/xenstore-read qubes-timezone 2> /dev/null`
if [ -n "$timezone" ]; then
ln -f /usr/share/zoneinfo/$timezone /etc/localtime
echo "# Clock configuration autogenerated based on Qubes dom0 settings" > /etc/sysconfig/clock
echo "ZONE=\"$timezone\"" >> /etc/sysconfig/clock
fi
# Set IP address again (besides action in udev rules); this is needed by
# DispVM (to override DispVM-template IP) and in case when qubes_ip was
# called by udev before loading evtchn kernel module - in which case

View File

@ -48,3 +48,9 @@ if [ -n "$name" ]; then
(grep -v "\<$name\>" /etc/hosts; echo "127.0.0.1 $name") > /etc/hosts
fi
timezone=`$XS_READ qubes-timezone 2> /dev/null`
if [ -n "$timezone" ]; then
ln -f /usr/share/zoneinfo/$timezone /etc/localtime
echo "# Clock configuration autogenerated based on Qubes dom0 settings" > /etc/sysconfig/clock
echo "ZONE=\"$timezone\"" >> /etc/sysconfig/clock
fi