Commit f7365a24 by funditus Committed by Stéphane Graber

lxc-debian: Make timezone match the host

Set timezone in container as on the host Signed-off-by: 's avatarfunditus <funditus@mail.ru> Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 7d0eb87e
......@@ -93,6 +93,18 @@ EOF
chroot $rootfs /usr/sbin/update-rc.d -f hwclock.sh remove
chroot $rootfs /usr/sbin/update-rc.d -f hwclockfirst.sh remove
# set initial timezone as on host
if [ -f /etc/timezone ]; then
echo $(cat /etc/timezone) > $rootfs/etc/timezone
chroot $rootfs dpkg-reconfigure -f noninteractive tzdata
elif [ -f /etc/sysconfig/clock ]; then
source /etc/sysconfig/clock
echo $ZONE > $rootfs/etc/timezone
chroot $rootfs dpkg-reconfigure -f noninteractive tzdata
else
echo "Timezone in container is not configured. Adjust it manually."
fi
echo "root:root" | chroot $rootfs chpasswd
echo "Root password is 'root', please change !"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment