dom0/vm: set VM timezone same as in dom0 - on VM boot (#413)
This commit is contained in:
parent
e409cfe766
commit
f55fe8a118
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user