Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
#!/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