forked from neil/lxc-templates
Fix timezone configuration
Signed-off-by: Tanya Degurechaff <34323200+TanyaEleventhGoddess@users.noreply.github.com>
This commit is contained in:
parent
afa18e5a30
commit
8911d8ff4b
@ -186,10 +186,12 @@ EOF
|
||||
# set initial timezone as on host
|
||||
if [ -f /etc/timezone ]; then
|
||||
cat /etc/timezone > "$rootfs/etc/timezone"
|
||||
rm -f "$rootfs/etc/localtime"
|
||||
chroot "$rootfs" dpkg-reconfigure -f noninteractive tzdata
|
||||
elif [ -f /etc/sysconfig/clock ]; then
|
||||
. /etc/sysconfig/clock
|
||||
echo "$ZONE" > "$rootfs/etc/timezone"
|
||||
rm -f "$rootfs/etc/localtime"
|
||||
chroot "$rootfs" dpkg-reconfigure -f noninteractive tzdata
|
||||
else
|
||||
echo "Timezone in container is not configured. Adjust it manually."
|
||||
|
@ -181,10 +181,12 @@ EOF
|
||||
# set initial timezone as on host
|
||||
if [ -f /etc/timezone ]; then
|
||||
cat /etc/timezone > "$rootfs/etc/timezone"
|
||||
rm -f "$rootfs/etc/localtime"
|
||||
chroot "$rootfs" dpkg-reconfigure -f noninteractive tzdata
|
||||
elif [ -f /etc/sysconfig/clock ]; then
|
||||
. /etc/sysconfig/clock
|
||||
echo "$ZONE" > "$rootfs/etc/timezone"
|
||||
rm -f "$rootfs/etc/localtime"
|
||||
chroot "$rootfs" dpkg-reconfigure -f noninteractive tzdata
|
||||
else
|
||||
echo "Timezone in container is not configured. Adjust it manually."
|
||||
|
Loading…
Reference in New Issue
Block a user