package zabbix-agent 1:2.0.2+dfsg-3 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zabbix (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Attempting removal of package, script fails regardless of whether daemon is running or not.
ProblemType: Package
DistroRelease: Ubuntu 12.10
Package: zabbix-agent 1:2.0.2+dfsg-3
ProcVersionSign
Uname: Linux 3.5.0-18-generic x86_64
NonfreeKernelMo
ApportVersion: 2.6.1-0ubuntu4
Architecture: amd64
Date: Thu Oct 25 08:18:58 2012
DpkgTerminalLog:
Removing zabbix-agent ...
invoke-rc.d: initscript zabbix-agent, action "stop" failed.
dpkg: error processing zabbix-agent (--remove):
subprocess installed pre-removal script returned error exit status 1
DuplicateSignature:
Removing zabbix-agent ...
invoke-rc.d: initscript zabbix-agent, action "stop" failed.
dpkg: error processing zabbix-agent (--remove):
subprocess installed pre-removal script returned error exit status 1
ErrorMessage: subprocess installed pre-removal script returned error exit status 1
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
MarkForUpload: True
SourcePackage: zabbix
Title: package zabbix-agent 1:2.0.2+dfsg-3 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1
UpgradeStatus: Upgraded to quantal on 2012-10-22 (2 days ago)
tags: | removed: need-duplicate-check |
I commented in the french version of the bug as well, I'll post the same, it could help the ones in my very same situation:
I confirm this. The issue is in the init scripts for the agent, for the server and for the proxy. The issue has been fixed in the 2.0.3 version of the package (I did a comparison of the init scripts between 2.0.2 and 2.0.3).
Apparently there's a wrong evaluation in the _ev_ function on lines 28-30 which throws an exit status of 1 despite the daemon being started properly. Dpkg gets the exit status of 1 and thinks some issue occurred during installation, leaving the package in an inconsistent state.
Here, this is the NON-working version from zabbix 2.0.2:
_ev_ () {
[ "$VERBOSE" != "no" ] && eval $@
}
This is the working version from the package zabbix 2.0.3 (from Ubuntu Raring):
_ev_ () {
[ "$VERBOSE" = "no" ] || eval $@
}
The solution is to copy the init scripts from the Raring version of the package (or fix the above function), recompile the deb package and everything should be fine.