X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Flive-bottom%2F02_timezone;h=10b634e0ab3119b8f94377f2cb769a89a462073d;hb=0543efb060e5d1d0a44a762c12ae7191119d6c88;hp=873c1da974693f33309644ebd7f0b89e6f8ed6fe;hpb=292e65d84b99afa4c9240c23e1433b828af80ba3;p=live-boot-grml.git diff --git a/scripts/live-bottom/02_timezone b/scripts/live-bottom/02_timezone index 873c1da..10b634e 100755 --- a/scripts/live-bottom/02_timezone +++ b/scripts/live-bottom/02_timezone @@ -1,21 +1,45 @@ -#! /bin/sh +#!/bin/sh -PREREQ="" -DESCRIPTION="Setting timezone..." +#set -e -. /scripts/live-functions +# initramfs-tools header + +PREREQ="" prereqs() { - echo "$PREREQ" + echo "${PREREQ}" } -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; +case "${1}" in + prereqs) + prereqs + exit 0 + ;; esac -cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime +# live-initramfs header + +. /scripts/live-functions + +log_begin_msg "Setting timezone..." + +# live-initramfs script + +if [ -n "${TIMEZONE}" ]; then + area="$(echo ${TIMEZONE} | cut -f1 -d '/')" + zone="$(echo ${TIMEZONE} | cut -f2 -d '/')" + chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null < /dev/null <