Ensure /etc/timezone also includes the TIMEZONE setting
[grml-debootstrap.git] / chroot-script
index 766a59d..4a20fa7 100755 (executable)
@@ -465,8 +465,12 @@ default_locales() {
 # adjust timezone {{{
 timezone() {
   if [ -n "$TIMEZONE" ] ; then
-     echo "Adjusting /etc/localtime"
-     ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
+    echo "Adjusting /etc/localtime"
+    ln -sf "/usr/share/zoneinfo/$TIMEZONE" /etc/localtime
+
+    echo "Setting /etc/timezone to $TIMEZONE"
+    printf '%s\n' "$TIMEZONE"  > /etc/timezone
+
   fi
 }
 # }}}