[Debian-live-changes] r2273 - in dists/trunk/live-initramfs: docs manpages scripts scripts/live-bottom

daniel at alioth.debian.org daniel at alioth.debian.org
Thu Jun 28 21:48:50 UTC 2007


Author: daniel
Date: 2007-06-28 21:48:50 +0000 (Thu, 28 Jun 2007)
New Revision: 2273

Modified:
   dists/trunk/live-initramfs/docs/ChangeLog
   dists/trunk/live-initramfs/manpages/live-initramfs.en.7
   dists/trunk/live-initramfs/scripts/live
   dists/trunk/live-initramfs/scripts/live-bottom/02_timezone
Log:


Modified: dists/trunk/live-initramfs/docs/ChangeLog
===================================================================
--- dists/trunk/live-initramfs/docs/ChangeLog	2007-06-28 19:40:48 UTC (rev 2272)
+++ dists/trunk/live-initramfs/docs/ChangeLog	2007-06-28 21:48:50 UTC (rev 2273)
@@ -1,3 +1,8 @@
+2007-06-28  Daniel Baumann  <daniel at debian.org>
+
+	* Applied patch from Mathieu Geli <mathieu.geli at gmail.com> to set the
+	  timezone with a boot parameter.
+
 2007-06-25  Daniel Baumann  <daniel at debian.org>
 
 	* scripts/live:

Modified: dists/trunk/live-initramfs/manpages/live-initramfs.en.7
===================================================================
--- dists/trunk/live-initramfs/manpages/live-initramfs.en.7	2007-06-28 19:40:48 UTC (rev 2272)
+++ dists/trunk/live-initramfs/manpages/live-initramfs.en.7	2007-06-28 21:48:50 UTC (rev 2273)
@@ -70,6 +70,8 @@
 This option causes live\-initramfs to reboot without attempting to eject the media and without asking the user to remove the boot media.
 .IP "\fBshowmounts\fR" 4
 This parameter will make live\-initramfs to show on "/" the ro filesystems (mostly compressed) on "/live". This is not enabled by default because could lead to problems by applications like "mono" which store binary paths on installation.
+.IP "\fBtimezone=\fR\fITIMEZONE" 4
+By default, timezone is set to UTC. Using the timezone parameter, you can set it to your local zone, e.g. Europe/Zurich.
 .IP "\fBtodisk=\fR\fIDEVICE" 4
 Adding this parameter, live\-initramfs will try to copy the entire read\-only media to the specified device before mounting the root filesystem. It probably needs a lot of free space. Subsequent boots should then skip this step and just specify the "live\-media=DEVICE" boot parameter with the same DEVICE used this time.
 .IP "\fBtoram\fR" 4

Modified: dists/trunk/live-initramfs/scripts/live
===================================================================
--- dists/trunk/live-initramfs/scripts/live	2007-06-28 19:40:48 UTC (rev 2272)
+++ dists/trunk/live-initramfs/scripts/live	2007-06-28 21:48:50 UTC (rev 2273)
@@ -194,6 +194,11 @@
 				export SHOWMOUNTS
 				;;
 
+		       timezone=*)
+			       TIMEZONE="${x#timezone=}"
+			       export TIMEZONE
+			       ;;
+
 			todisk=*)
 				TODISK=${x#todisk=}
 				export TODISK

Modified: dists/trunk/live-initramfs/scripts/live-bottom/02_timezone
===================================================================
--- dists/trunk/live-initramfs/scripts/live-bottom/02_timezone	2007-06-28 19:40:48 UTC (rev 2272)
+++ dists/trunk/live-initramfs/scripts/live-bottom/02_timezone	2007-06-28 21:48:50 UTC (rev 2273)
@@ -26,6 +26,20 @@
 
 # live-initramfs script
 
-cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
+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 <<EOF
+set tzdata/Areas $area
+set tzdata/Zones/$area $zone
+EOF
+    cp -f /root/usr/share/zoneinfo/${area}/${zone} /root/etc/localtime
+else
+    chroot /root debconf-communicate -fnoninteractive live-initramfs > /dev/null <<EOF
+set tzdata/Areas Etc
+set tzdata/Zones/Etc UTC
+EOF
+    cp -f /root/usr/share/zoneinfo/UTC /root/etc/localtime
+fi   
 
 log_end_msg




More information about the Debian-live-changes mailing list