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 !"