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()
{
        # Return
        #   0 if daemon has been started 
        #   1 if daemon was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON"
        RETVAL="$?"
        [ "$RETVAL" -ne 0  -a  "$RETVAL" -ne 1 ] && return 2
        return "$RETVAL"
}

instead of
start_nscd()
{
        # Return
        #   0 if daemon has been started or was already running
        #   2 if daemon could not be started
        start-stop-daemon --start --quiet --pidfile "$PIDFILE" --exec "$DAEMON" 
|| return 2
}

-- 
package nscd 2.11.1-0ubuntu7.2 failed to install/upgrade: subprocess installed 
post-installation script returned error exit status 1
https://bugs.launchpad.net/bugs/652876
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to