Package: qmail
Version: 1.03-38
Severity: minor
Tags: patch
Hi Jon!
Due to incorrect communication of postinst script with debconf, it does not
matter what answer is provided for "qmail/start" debconf question, qmail is
not started anyway.
I attach patch with update of qmail.templates file and postinst script. It
also changes type of this question from select to boolean (seems to be more
appropriate here). If you prefer to keep current template type, compare
$ret[1] in postinst with "yes" instead of "true".
postrm file was updated similarily for "qmail/userpurge" template.
th.
-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.4.27-grsec
Locale: LANG=sk_SK, LC_CTYPE=sk_SK (charmap=ISO-8859-2)
Versions of packages qmail depends on:
ii debconf 1.4.30.13 Debian configuration management sy
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii netbase 4.21 Basic TCP/IP networking system
ii perl-modules 5.8.4-8 Core Perl modules
ii procmail 3.22-11 Versatile e-mail processor
ii ucspi-tcp 0.88-9 tools for building TCP client-serv
-- debconf information excluded
diff -ruN qmail-1.03.orig/debian/postinst qmail-1.03/debian/postinst
--- qmail-1.03.orig/debian/postinst 2005-06-28 00:02:42.000000000 +0200
+++ qmail-1.03/debian/postinst 2005-06-28 00:07:42.000000000 +0200
@@ -52,8 +52,10 @@
input ("medium","qmail/qlist");
input ("medium","qmail/start");
- my @ret=go();
- if ( $ret[0] eq "" || $answer =~ /^\s*[yY]/ ) {
+ go();
+
+ my @ret= get("qmail/start");
+ if ( $ret[0] == 0 && $ret[1] eq "true" ) {
debug("Starting qmail . . .\n");
system("/etc/init.d/qmail start 1>&2");
}
diff -ruN qmail-1.03.orig/debian/postrm qmail-1.03/debian/postrm
--- qmail-1.03.orig/debian/postrm 2005-06-28 00:02:42.000000000 +0200
+++ qmail-1.03/debian/postrm 2005-06-28 00:06:13.000000000 +0200
@@ -15,8 +15,10 @@
# This is not -*quite*- so evil ...
system("rm -rf /etc/qmail/users");
input ("medium","qmail/userpurge");
- my @ret=go();
- if ( $ret[0] eq "" || $answer =~ /^\s*[yY]/ ) {
+ go();
+
+ my @ret= get("qmail/userpurge");
+ if ( $ret[0] == 0 && $ret[1] eq "true" ) {
system('userdel alias >/dev/null');
system('userdel qmaild >/dev/null');
system('userdel qmails >/dev/null');
diff -ruN qmail-1.03.orig/debian/qmail.templates
qmail-1.03/debian/qmail.templates
--- qmail-1.03.orig/debian/qmail.templates 2005-06-28 00:02:42.000000000
+0200
+++ qmail-1.03/debian/qmail.templates 2005-06-28 00:04:24.000000000 +0200
@@ -14,8 +14,8 @@
can be found in /usr/doc/qmail
Template: qmail/start
-Type: select
-Choices: yes, no
+Type: boolean
+Default: true
Description: Do you want to start qmail now?
Template: qmail/reboot
@@ -25,8 +25,8 @@
you are ready by typing (as root) "/etc/init.d/qmail start" at a shell prompt.
Template: qmail/userpurge
-Type: select
-Choices: yes, no
+Type: boolean
+Default: true
Description: Remove qmail users during a purge?
Template: qmail/recipientmap