Re: timezone

2007-07-19 Thread Daniel Baumann
Vladimir Stavrinov wrote:
 My be better (not sure) to add separate boot option for this.

done, thanks.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  [EMAIL PROTECTED]
Internet:   http://people.panthera-systems.net/~daniel-baumann/

___
Debian-live-devel mailing list
Debian-live-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel


timezone

2007-06-28 Thread Vladimir Stavrinov
Hi livers!

Do You know how to set timezone at boot time?

-- 

*
   Vladimir Stavrinov  **
***   [EMAIL PROTECTED]   **
*

___
Debian-live-devel mailing list
Debian-live-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel


Re: timezone

2007-06-28 Thread Mathieu GELI

Do You know how to set timezone at boot time?


It seems for now hardocded to Etc/GMT.
We could have some pseudo debconf preseeding in that place like
following patch does.

Applied to current SVN, I use it like e.g :
$ make-live --bootappend=timezone=Europe/Paris

I'm actually not really happy with that as we could go adding zillions
of new debconf
paramaters when using a preseed file with the preseed/file= keyword
seems saner.

Cheers

--
Mathieu
--- scripts/live	2007-06-28 21:38:52.0 +0200
+++ scripts/live.new	2007-06-28 21:39:34.0 +0200
@@ -194,6 +194,11 @@
 export SHOWMOUNTS
 ;;
 
+		   timezone=*)
+			   TIMEZONE=${x#timezone=}
+			   export TIMEZONE
+			   ;;
+
 			todisk=*)
 TODISK=${x#todisk=}
 export TODISK
--- scripts/live-bottom/02_timezone	2007-06-28 21:38:52.0 +0200
+++ scripts/live-bottom/02_timezone.new	2007-06-28 21:39:41.0 +0200
@@ -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
___
Debian-live-devel mailing list
Debian-live-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Re: timezone

2007-06-28 Thread Vladimir Stavrinov
On Thu, Jun 28, 2007 at 09:51:18PM +0200, Mathieu GELI wrote:

 I'm actually not really happy with that as we could go adding zillions

Don't agree. This is good idea to use kernel boot parameters.
This is flexible way to customize environment manually at boot
time, especially for pxe boot.

 parameters when using a preseed file with the preseed/file= keyword
 seems saner.

This is OK too, but it is not replacement. It may be considered
as main way to set parameters, while command line is alternative
options. We need both methods.



**
   Vladimir Stavrinov   **
***   [EMAIL PROTECTED]   **
*   http://inist.ru   
**


___
Debian-live-devel mailing list
Debian-live-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel


Re: timezone

2007-06-28 Thread Mathieu GELI
 Don't agree. This is good idea to use kernel boot parameters.
 This is flexible way to customize environment manually at boot
 time, especially for pxe boot.

Well yes, the two mentioned way have pros and cons. I'm thinking also
to have that done in live-sysvinit, i.e in late userland, we could
then imagine
some fancy UI that'll ask the user to configure such things, or for
non-interactive boot imagine :
1) static way : preseeded file present in the rootfs (similar to
actual situation)
2) dynamic : preseeded file downloaded from the network via [*] (put
here your preferred protocol)

I've got some code lying around partially implementing situation 2,
via HTTP/GPG, and a direct application : dynamically enable
winbind/Active Directory authentication for lives to be part of a
Windows Domain (and transfer file in a secure way)

My two cents

-- 
Mathieu

___
Debian-live-devel mailing list
Debian-live-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel