Bug#477578: exim4-base: incorrect logic in init script

Tim Cross tcross at une.edu.au
Thu Apr 24 00:01:35 UTC 2008


Package: exim4-base
Version: 4.69-2+b1
Severity: normal

I think the logic in the /etc/init.d/exim4 script is incorrect. In the
script, there is the following ....

if ! [ -x "/lib/lsb/init-functions" ]; then
  . /lib/lsb/init-functions
else
  echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
  exit 1
fi

/lib/lsb/init-functions is not executed, does not have the execute
permission set and is only 'sourced'. This means the -x test will
fail. However, this error is masked by the negation of the
test. Essentially, this test is saying that if /lib/lsb/init-functions
is not executable, then source it. However, the test could fail
i.e. is not executable if the file also does not exist. 

As the file is being sourced rather than executed, it would probably
be better to replace this with 

if [ -r "/lib/lsb/init-functions" ]; then
  . /lib/lsb/init-functions
else
  echo "E: /lib/lsb/init-functions not found, lsb-base (>= 3.0-6) needed"
  exit 1
fi

which will check to see if /lib/lsb/init-functions is readable and if
it is, will source it, if its not, raise an error. 

I also wanted to confirm Bug#477194 - Exim4 will fail installation at
present because the init script fails to start the exim daemon and it
does appear to be related to the escaping of empty argument options
i.e. passing '' '' '' representing options that are not set to any
specific value and resulting in a failure and message indicating bad
command line options. As a result of this, the exim4 and
exim4-daemon-* pacakges fail to install correctly. 

The quick fix is to just remove the empty arguements from the call to
start_stop_daemon in the init script. 

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages exim4-base depends on:
ii  adduser                       3.107      add and remove users and groups
ii  cron                          3.0pl1-104 management of regular background p
ii  debconf [debconf-2.0]         1.5.21     Debian configuration management sy
ii  exim4-config [exim4-config-2] 4.69-2     configuration for the Exim MTA (v4
ii  libc6                         2.7-10     GNU C Library: Shared libraries
ii  libdb4.6                      4.6.21-7   Berkeley v4.6 Database Libraries [
ii  lsb-base                      3.2-10     Linux Standard Base 3.2 init scrip
ii  netbase                       4.32       Basic TCP/IP networking system

Versions of packages exim4-base recommends:
ii  bsd-mailx [mailx]  8.1.2-0.20071201cvs-2 A simple mail user agent
ii  mailx              1:20071201-2          Transitional package for mailx ren
ii  psmisc             22.6-1                Utilities that use the proc filesy

-- debconf information:
  exim4/purge_spool: false
  exim4-base/drec:


-- 
Tim Cross
Information Technology Directorate 
University of New England
 Phone: +61 2 6773 3210
Mobile: 0428 212217
   Fax: +61 2 6773 3424
E-Mail: tcross at une.edu.au
   Web: http://www.une.edu.au/itd
---
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

"Social Engineering - because there is no patch for human stupidity."










More information about the Pkg-exim4-maintainers mailing list