[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#391529: Etch installer freezed by tzdata



On Mon, Oct 09, 2006 at 12:02:48AM +0200, Aurelien Jarno wrote:
> reassign 391529 tzdata
> severity 391529 serious
> thanks
> 
> Hi,
> 
> I am now able to reproduce this bug. The problem is that the postinst of 
> tzdata ask a question to the user, not via debconf, so it is not 
> displayed.
> 
> The bug has been triggered by the fact the version of tzdata in d-i beta3 
> and testing is different.
> 
> The solution is to rewrite the postinst of tzdata + tzconfig using 
> debconf.

  Well, AFAIU, the sole problematic thing in the tzdata postinst is that
tzconfig may be called, and tzconfig performs some 'read' on the tty.
Even is the best fix would be to rewrite tzconfig to use debconf,
wouldn't this patch solve the problem for now ?

idiff --git a/debian/postinst b/debian/postinst
index 8e7ef93..def7e04 100644
--- a/debian/postinst
+++ b/debian/postinst
@@ -18,7 +18,7 @@ Universal Time is now:  $UTdate."

 set_timezone() {
     frontend=`echo "$DEBIAN_FRONTEND" | tr '[:upper:]' '[:lower:]'`
-    if [ "$frontend" = noninteractive ]; then
+    if [ "$frontend" = noninteractive -o ! tty -s ]; then
         echo "Non-interactive mode, setting timezone to UTC.  Run tzconfig to change."
         echo "UTC" >/etc/timezone
         ln -sf /usr/share/zoneinfo/UTC /etc/localtime



-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpNfrSTvOiNr.pgp
Description: PGP signature


Reply to: