Bug#337229: exim4-config: update-exim4.conf ignores dc_use_split_config if -d|--confdir is used

Marc Haber mh+debian-packages at zugschlus.de
Thu Nov 3 14:47:55 UTC 2005


tags #337229 confirmed pending
thanks

On Thu, Nov 03, 2005 at 10:39:54PM +1000, Ted Percival wrote:
> When update-exim4.conf is run with the -d|--confdir option, it uses the
> conf.d directory regardless of whether update-exim4.conf.conf has
> dc_use_split_config set to false.

Actually, it uses the setting from /etc/exim4/update-exim4.conf.conf
in any case regardless of --confdir being used. I fixed this in svn,
please try the attached patch.

> Furthermore update-exim4.conf dies if the conf.d directory doesn't exist
> even though dc_use_split_config is false

But it does die with a clear error message, right?

> (might be caused by the same problem).

Probably. If it doesn't die with a clear error message about not
finding conf.d, then _that's_ an additional bug, and one that I cannot
reproduce :-(

Greetings
Marc

-- 
-----------------------------------------------------------------------------
Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835
-------------- next part --------------
--- debian/debconf/update-exim4.conf	(revision 1273)
+++ debian/debconf/update-exim4.conf	(working copy)
@@ -11,8 +11,6 @@
 UPEX4C_outputfile="${UPEX4C_autoconfigfile}"
 UPEX4C_version=""
 
-UE4CC="$UPEX4C_confdir/update-exim4.conf.conf"
-
 usage() {
 cat <<EOF
 $0 - Generate exim4 configuration files
@@ -78,7 +76,7 @@
   exit 0
 fi
 
-
+UE4CC="$UPEX4C_confdir/update-exim4.conf.conf"
 UPEX4C_confd=$UPEX4C_confdir/conf.d
 
 [ -d ${UPEX4C_confd} ] || \
@@ -271,9 +269,10 @@
 # WARNING WARNING WARNING
 # WARNING WARNING WARNING
 # WARNING WARNING WARNING
-# this file is generated dynamically from the files in
-# CONFDIR/conf.d/ or /etc/exim4/exim4.conf.template respectively and
-# /etc/exim4/update-exim4.conf.conf
+# This file is generated dynamically from the files in
+# the conf.d/ directory, or from exim4.conf.template respectively.
+# Additional information is read from update-exim4.conf.conf
+# This version of the file was created from the directory $UPEX4C_confdir
 # Any changes you make here will be lost.
 # See /usr/share/doc/exim4-base/README.Debian.gz and update-exim4.conf(8)
 # for instructions of customization.
@@ -309,7 +308,7 @@
 			if [ -e "/etc/exim4/exim4.conf.localmacros" ]; then
 			  LOCALMACROS="/etc/exim4/exim4.conf.localmacros"
 			fi
-                        cat $LOCALMACROS /etc/exim4/exim4.conf.template | \
+                        cat $LOCALMACROS $TEMPLATEFILE | \
                         removecomments | \
                         sed -e "s/DEBCONF[^D][^E][^B].*DEBCONF//g" \
                                 >> ${UPEX4C_outputfile}.tmp
@@ -365,15 +364,15 @@
 		>> ${UPEX4C_outputfile}.tmp
 ;;
 false)
-	if [ ! -r /etc/exim4/exim4.conf.template ] ; then
-		echo "Error: Unsplit config selected and /etc/exim4/exim4.conf.template missing ... exiting" 1>&2
+	if [ ! -r $TEMPLATEFILE ] ; then
+		echo "Error: Unsplit config selected and $TEMPLATEFILE missing ... exiting" 1>&2
 		exit 1
 	fi
 	LOCALMACROS=""
 	if [ -e "/etc/exim4/exim4.conf.localmacros" ]; then
-		LOCALMACROS="/etc/exim4/exim4.conf.localmacros"
+		LOCALMACROS="${UPEX4C_confdir}/exim4.conf.localmacros"
 	fi
-	cat $LOCALMACROS /etc/exim4/exim4.conf.template \
+	cat $LOCALMACROS $TEMPLATEFILE \
 	| sed -e "s?DEBCONFlocal_domainsDEBCONF?@:${local_domains}?g" \
 		-e "s?DEBCONFrelay_domainsDEBCONF?${dc_relay_domains}?g" \
 		-e "s?DEBCONFrelay_netsDEBCONF?${dc_relay_nets}?g" \


More information about the Pkg-exim4-maintainers mailing list