exim4 cannot be removed, if stopped
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
exim4 (Debian) |
New
|
Undecided
|
Unassigned | ||
exim4 (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Binary package hint: exim4
I wanted to replace an installed exim4 on Hardy with Postfix.
After having stopped exim4 already, the postfix installation (or rather removal of exim4) failed as pasted below.
It all boils down to that if killproc returns "3" in stop_exim() this means "process is not running" and the init script should (or rather _must_) not fail.
A patch could be to replace
killproc -p "$QRPIDFILE" "$DAEMON"
with
killproc -p "$QRPIDFILE" "$DAEMON" || RVAR=$? && [ $RVAR = 3 ] && true || return $RVAR
, which will return 0/true in case of return value "3", too.
The same applies at least to
killproc -p "$PIDFILE" "$DAEMON"
in the same file, too.
# apt-get install postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
openssl ssl-cert
Suggested packages:
ca-certificates openssl-doc postfix-cdb postfix-ldap postfix-mysql postfix-pcre postfix-pgsql
procmail resolvconf sasl2-bin
The following packages will be REMOVED:
exim4-base exim4-config exim4-daemon-light
The following NEW packages will be installed:
openssl postfix ssl-cert
0 upgraded, 3 newly installed, 3 to remove and 2 not upgraded.
Need to get 1557kB of archives.
After this operation, 4096B disk space will be freed.
Do you want to continue [Y/n]?
Get:1 http://
Get:2 http://
Get:3 http://
Fetched 1557kB in 0s (4614kB/s)
Preconfiguring packages ...
dpkg: exim4-config: dependency problems, but removing anyway as you request:
exim4-base depends on exim4-config (>= 4.30) | exim4-config-2; however:
Package exim4-config is to be removed.
Package exim4-config-2 is not installed.
Package exim4-config which provides exim4-config-2 is to be removed.
exim4-base depends on exim4-config (>= 4.30) | exim4-config-2; however:
Package exim4-config is to be removed.
Package exim4-config-2 is not installed.
Package exim4-config which provides exim4-config-2 is to be removed.
(Reading database ... 11746 files and directories currently installed.)
Removing exim4-config ...
dpkg: exim4-daemon-light: dependency problems, but removing anyway as you request:
mailx depends on exim4 | mail-transport-
Package exim4 is not installed.
Package mail-transport-
Package exim4-daemon-light which provides mail-transport-
Removing exim4-daemon-light ...
* Stopping MTA
/sbin/start-
invoke-rc.d: initscript exim4, action "stop" failed.
dpkg: error processing exim4-daemon-light (--remove):
subprocess pre-removal script returned error exit status 3
dpkg: exim4-base: dependency problems, but removing anyway as you request:
exim4-daemon-light depends on exim4-base (>= 4.69).
Removing exim4-base ...
* Stopping MTA
/sbin/start-
invoke-rc.d: initscript exim4, action "stop" failed.
dpkg: error processing exim4-base (--remove):
subprocess post-removal script returned error exit status 3
Errors were encountered while processing:
exim4-daemon-light
exim4-base
E: Sub-process /usr/bin/dpkg returned an error code (1)
Changed in exim4: | |
status: | New → Confirmed |
I've seen this bug as well, though in my case exim4 was refusing to start because it was misconfigured. Since exim4 wasn't started, I couldn't install an mta that I knew how to configure until I fixed exim4's configuration. A vexing situation...