5 # initramfs-tools header
21 # live-initramfs header
23 if [ -n "${NOTIMEZONE}" ]
28 . /scripts/live-functions
30 log_begin_msg "Setting timezone"
32 # live-initramfs script
34 if [ -n "${TIMEZONE}" ]
36 area="$(echo ${TIMEZONE} | cut -f1 -d '/')"
37 zone="$(echo ${TIMEZONE} | cut -f2 -d '/')"
39 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
40 set tzdata/Areas ${area}
41 set tzdata/Zones/${area} ${zone}
44 cp -f /root/usr/share/zoneinfo/${area}/${zone} /root/etc/localtime
47 chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null << EOF
49 set tzdata/Zones/Etc UTC
52 cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
57 sed -i -e "s/UTC=.*/UTC=${UTC}/" /root/etc/default/rcS