From: Guido Trotter Date: Fri, 7 Oct 2011 19:43:50 +0000 (-0400) Subject: timezone hook: use host-default if none present X-Git-Tag: v0.10~3 X-Git-Url: http://git.equinoxoli.org/?p=ext%2Finstance-debootstrap.git;a=commitdiff_plain;h=309a90df33a1a3896dda4f8fa27a2efa8470f34d timezone hook: use host-default if none present Signed-off-by: Guido Trotter Reviewed-by: Iustin Pop --- diff --git a/examples/hooks/timezone b/examples/hooks/timezone index ff6c968..2214c7c 100755 --- a/examples/hooks/timezone +++ b/examples/hooks/timezone @@ -1,8 +1,11 @@ #!/bin/sh # -# This is an example script that sets the timezone to a given default +# This is an example script that sets the timezone to a given default, or to the one of the host is none is configured -cp confdata/timezone $TARGET/etc/ -chroot $TARGET dpkg-reconfigure --frontend noninteractive tzdata +if [ -r confdata/timezone ] +then cp confdata/timezone $TARGET/etc/ +else cp /etc/timezone $TARGET/etc/ +fi +chroot $TARGET dpkg-reconfigure --frontend noninteractive tzdata