]> xenbits.xensource.com Git - people/liuw/osstest.git/commitdiff
i18n/l10n: Make Timezone configurable and change the default
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 15 May 2015 10:31:35 +0000 (11:31 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 15 May 2015 17:24:56 +0000 (18:24 +0100)
* Introduce a new config option Timezone
* Replace hardcoded Europe/London everywhere with $c{Timezone}
* The default is UTC
* But in production-config-cambridge set it to Europe/London

The overall effect is:
* No change in Cambridge
* Default timezone changes to UTC but can now be overridden
* Production instance timezone changes to UTC

(It appears that there is no reasonable way to find out the Olson TZ
name of the controller host's default timezone.  If there were, or we
discover one, we should arrange that the default is set
appropriately.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Osstest.pm
Osstest/Debian.pm
README
production-config-cambridge
ts-freebsd-install
ts-redhat-install

index 7f72bc69a1ffc0e76462ceec68c9c26a5bc7e018..e8bd77bf3a02dd52257b0c5f1d8188e75c0b8ac9 100644 (file)
@@ -76,6 +76,8 @@ our %c = qw(
     DebianNonfreeFirmware firmware-bnx2
 
     HostnameSortSwapWords 0
+
+    Timezone UTC
 );
 
 $c{$_}='' foreach qw(
index 2b44396d1cd3b1b78deb27fcf61b69ef93476220..e2fa565dabe205224c47bf75d833350811954875 100644 (file)
@@ -636,7 +636,7 @@ d-i mirror/country string manual
 d-i mirror/http/proxy string
 
 d-i clock-setup/utc boolean true
-d-i time/zone string Europe/London
+d-i time/zone string $c{Timezone}
 d-i clock-setup/ntp boolean true
 
 d-i partman-md/device_remove_md boolean true
diff --git a/README b/README
index 0aaba2cbc21bb80d06b11aae516acdb719b9e061..44e298997f561a767d5a574a4eb7be54a3e504c2 100644 (file)
--- a/README
+++ b/README
@@ -476,6 +476,9 @@ TftpPxeTemplatesReal
     Template filename which mg-hosts mkpxedir should make be a symlink to
     the TftpPxeTemplates.  Not used otherwise.
 
+Timezone
+    Olson TZ name, used by host and guest installers
+
 ========================================
 
 Host-specific config settigs
index 62215d0abeb6fa8d12f00aea23ef286126c4f70b..f32cd842a7332d4d8bcfb59f6d3669c5133d6aa1 100644 (file)
@@ -30,6 +30,8 @@ HostnameSortSwapWords 1
 DnsDomain xs.citrite.net
 NetNameservers 10.80.248.2 10.80.16.28 10.80.16.67
 
+Timezone Europe/London
+
 Stash /home/xc_osstest/logs
 Images /home/xc_osstest/images
 Logs /home/xc_osstest/logs
index 6e8fada0908d426f52d2b393cf6ab3a8f490786f..0d6eb0c4f0c3b8a94a1cd64a43819829c1ce2e27 100755 (executable)
@@ -82,7 +82,7 @@ END
 
             sed -i '/^ttyu0/s/off/on/' $mnt/etc/ttys
 
-            cp $mnt/usr/share/zoneinfo/Europe/London $mnt/etc/localtime
+            cp $mnt/usr/share/zoneinfo/$c{Timezone} $mnt/etc/localtime
 
             cat <<'ENDKEYS' >$mnt/boot/loader.conf
 boot_multicons="YES"
index 22c30613d9956a9120e3bc6ef81109cdb9ae1406..10da55936b6f7372b97e985f622a5d61b766002c 100755 (executable)
@@ -59,7 +59,7 @@ selinux --disable
 sshpw --username=root xenroot --plaintext
 sshpw --username=iwj xenroot --plaintext
 
-timezone --utc Europe/London
+timezone --utc $c{Timezone}
 bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb console=ttyS0,$c{Baud}n8"
 
 # The following is the partition information you requested