package nscd 2.11.1-0ubuntu7.2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1 due to initscript failing to start
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
eglibc (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Lucid |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
Problem occurred after apt-get install, apt-get remove and again apt-get install of the following packages:
sudo apt-get install libpam-ldap libnss-ldap nss-updatedb libnss-db nfs-common nscd ldap-utils
Description: Ubuntu 10.04.1 LTS
Release: 10.04
nscd:
Installed: 2.11.1-0ubuntu7.2
Candidate: 2.11.1-0ubuntu7.2
Version table:
*** 2.11.1-0ubuntu7.2 0
500 http://
100 /var/lib/
2.
500 http://
Not sure if it is working correctly or not, it gave an error message, so...?
2.
500 http://
ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: nscd 2.11.1-0ubuntu7.2
ProcVersionSign
Uname: Linux 2.6.32-25-server x86_64
Architecture: amd64
Date: Fri Oct 1 12:22:27 2010
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationMedia: Custom Live CD - Release amd64
SourcePackage: eglibc
Title: package nscd 2.11.1-0ubuntu7.2 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Changed in eglibc (Ubuntu Lucid): | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in eglibc (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → Medium |
summary: |
package nscd 2.11.1-0ubuntu7.2 failed to install/upgrade: subprocess - installed post-installation script returned error exit status 1 + installed post-installation script returned error exit status 1 due to + initscript failing to start |
Installing (using apt-get upgrade) new versions of nscd always fail with the error
Setting up nscd (2.11.1-0ubuntu7.5) ...
* Starting Name Service Cache Daemon nscd [fail]
invoke-rc.d: initscript nscd, action "start" failed.
dpkg: error processing nscd (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
nscd
E: Sub-process /usr/bin/dpkg returned an error code (1)
The source of the problem is that the postinst script always attempts to do a start of the service.
Unfortunately the start code in /etc/init.d/nscd does not quite do the right thing when nscd is already running.
start_ncsd function need to be changed to something more like this:
start_nscd()
start- stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON"
{
# Return
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
RETVAL="$?"
[ "$RETVAL" -ne 0 -a "$RETVAL" -ne 1 ] && return 2
return "$RETVAL"
}
instead of
start- stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" || return 2
start_nscd()
{
# Return
# 0 if daemon has been started or was already running
# 2 if daemon could not be started
}