From bf0a37a0f41cdb3c68b1d9e536b67374beee9152 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sat, 24 Aug 2013 22:36:02 -0400 Subject: [PATCH] fix(make_chroot): Move timezone setup to general init function. No idea why this was in the user setup function, move it a bit. --- sdk_lib/make_chroot.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk_lib/make_chroot.sh b/sdk_lib/make_chroot.sh index 4134e4e2fd..716813db19 100755 --- a/sdk_lib/make_chroot.sh +++ b/sdk_lib/make_chroot.sh @@ -139,14 +139,6 @@ delete_existing() { } init_users () { - info "Set timezone..." - # date +%Z has trouble with daylight time, so use host's info. - rm -f "${FLAGS_chroot}/etc/localtime" - if [ -f /etc/localtime ] ; then - cp /etc/localtime "${FLAGS_chroot}/etc" - else - ln -sf /usr/share/zoneinfo/PST8PDT "${FLAGS_chroot}/etc/localtime" - fi info "Adding user/group..." # Add ourselves as a user inside the chroot. bare_chroot groupadd -g 5000 eng @@ -202,6 +194,14 @@ EOF # Fix bad group for some. chown -R root:root "${FLAGS_chroot}/etc/"sudoers* + info "Setting timezone..." + rm -f "${FLAGS_chroot}/etc/localtime" + if [ -f /etc/localtime ] ; then + cp /etc/localtime "${FLAGS_chroot}/etc" + else + ln -sf /usr/share/zoneinfo/UTC "${FLAGS_chroot}/etc/localtime" + fi + info "Setting up hosts/resolv..." # Copy config from outside chroot into chroot. cp /etc/{hosts,resolv.conf} "$FLAGS_chroot/etc/"