Package: dovecot-core
Version: 1:2.0.15-1
Severity: minor
Tags: patch

Today I had a short look into changelog.Debian.gz and the patch attached to
bug #627794. I wondered why the whole doveconf output is piped through sed.
When doveconf's -h option is present only the setting's value will be
written to stdout; see also doveconf(1).

The attached patch cleans up the init script a bit.


Regards,
Pascal
-- Package-specific info:

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dovecot-core depends on:
ii  adduser         3.113           
ii  libbz2-1.0      1.0.5-7         
ii  libc6           2.13-21         
ii  libpam-runtime  1.1.3-2         
ii  libpam0g        1.1.3-2         
ii  libssl1.0.0     1.0.0e-2        
ii  openssl         1.0.0e-2        
ii  ucf             3.0025+nmu2     
ii  zlib1g          1:1.2.3.4.dfsg-3

dovecot-core recommends no packages.

Versions of packages dovecot-core suggests:
pn  dovecot-gssapi        <none>    
pn  dovecot-imapd         1:2.0.15-1
pn  dovecot-ldap          <none>    
pn  dovecot-lmtpd         1:2.0.15-1
pn  dovecot-managesieved  1:2.0.15-1
pn  dovecot-mysql         <none>    
pn  dovecot-pgsql         1:2.0.15-1
pn  dovecot-pop3d         1:2.0.15-1
pn  dovecot-sieve         1:2.0.15-1
pn  dovecot-solr          <none>    
pn  dovecot-sqlite        <none>    
pn  ntp                   <none>    

Versions of packages dovecot-core is related to:
pn  dovecot-common                 1:2.0.15-1
pn  dovecot-core [dovecot-common]  1:2.0.15-1
pn  dovecot-dbg                    1:2.0.15-1
pn  dovecot-dev                    <none>    
pn  dovecot-gssapi                 <none>    
pn  dovecot-imapd                  1:2.0.15-1
pn  dovecot-ldap                   <none>    
pn  dovecot-lmtpd                  1:2.0.15-1
pn  dovecot-managesieved           1:2.0.15-1
pn  dovecot-mysql                  <none>    
pn  dovecot-pgsql                  1:2.0.15-1
pn  dovecot-pop3d                  1:2.0.15-1
pn  dovecot-sieve                  1:2.0.15-1
pn  dovecot-sqlite                 <none>    

-- Configuration Files:
/etc/default/dovecot changed:
ALLOW_COREDUMPS=1


-- no debconf information
>From 79cabb74c5d855a882050b90481e79f409859d87 Mon Sep 17 00:00:00 2001
From: Pascal Volk <u...@localhost.localdomain.org>
Date: Sun, 25 Sep 2011 13:01:09 +0200
Subject: debian/dovecot-core.init: Use `doveconf -h setting` instead of sed.

---
 debian/dovecot-core.init |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/debian/dovecot-core.init b/debian/dovecot-core.init
index 2698b1d..7181641 100644
--- a/debian/dovecot-core.init
+++ b/debian/dovecot-core.init
@@ -60,8 +60,7 @@ if [ -f /etc/inetd.conf ]; then
   for p in `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \
     /etc/inetd.conf`
   do
-    for q in `doveconf -n | \
-      sed -r "s/^[ \t]*protocols[ \t]*=[ \t]*(([^\"]*)|\"(.*)\")/\2\3/;t;d"`
+    for q in `doveconf -n -h protocols`
     do
       if [ $p = $q ]; then
         log_daemon_msg "protocol ${p} configured both in inetd and in dovecot" "$NAME" && log_end_msg 1
@@ -73,7 +72,7 @@ fi
 
 # determine the location of the PID file
 # overide by setting base_dir in conf file or PIDBASE in /etc/defaults/$NAME
-PIDBASE=${PIDBASE:-`doveconf -n -c ${CONF} | sed -r "s/^[ \t]*base_dir[ \t]*=[ \t]*([^ \t]*)/\1/;t;d"`}
+PIDBASE=${PIDBASE:-`doveconf -n -c ${CONF} -h base_dir`}
 PIDFILE=${PIDBASE:-/var/run/dovecot}/master.pid
 
 #
-- 
1.7.6.3

Reply via email to