Bug#510908: preseeding tzdata fails
retitle 510908 tzdata doesn't respect debconf preseeding
tag 510908 patch
thanks
On 05/16/2011 04:49 PM, Aurelien Jarno wrote:
> tzdata should use data from debconf if neither /etc/localtime nor
> /etc/timezone, otherwise it should default to the value read from these
> files.
exactely; the problem here is that tzdata in config, if neither
/etc/timezone nor /etc/localtime is present, and debconf values are
stored in the db, then tzdata does *not* generate /etc/timezone from the
values of debconf.
attached is a patch that fixed that.
Regards,
Daniel
--
Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email: daniel.baumann@progress-technologies.net
Internet: http://people.progress-technologies.net/~daniel.baumann/
>From 3bcceafec00aa0a6485b1a80f79a57602fa01b49 Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Mon, 16 May 2011 16:35:13 +0200
Subject: [PATCH] Correcting debconf config script to respect preseeding of
tzdata (Closes: #510908).
---
debian/config | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/debian/config b/debian/config
index 4a00f9c..a910e0f 100644
--- a/debian/config
+++ b/debian/config
@@ -356,11 +356,14 @@ if [ -e /etc/timezone ] && [ -e /etc/localtime ] ; then
fi
# The timezone has never been configured or is falsely configured
elif ! [ -e /etc/localtime ] || [ -n "$DEBCONF_RECONFIGURE" ] ; then
- if [ -z "$AREA" ] || [ -z "$ZONE" ] ; then
- AREA="Etc"
- ZONE="UTC"
- echo "Etc/UTC" > /etc/timezone
- fi
+ AREA="Etc"
+ ZONE="UTC"
+
+ db_get tzdata/Areas && AREA="$RET"
+ db_get tzdata/Zones/$AREA && ZONE="$RET"
+
+ echo "$AREA/$ZONE" > /etc/timezone
+
db_fset tzdata/Areas seen false
db_fset tzdata/Zones/$AREA seen false
# The user want to handle the timezone by him/herself
--
1.7.4.4
Reply to: