* oggei [Mon, 21 Jan 2008 16:07:24 +0100]:

> Evidence that return 1, taken from /etc/init.d/amule-daemon:

> do_stop()
> {
>         # Return
>         #   0 if daemon has been stopped
>         #   1 if daemon was already stopped
>         #   2 if daemon could not be stopped
>         start-stop-daemon --stop --quiet --retry="TERM/30/KILL/5" --exec
> $DAEMON --user "$AMULED_USER" --chuid "$AMULED_USER" 
>         return "$?"

do_stop is a function, and those return codes are the return codes of
the *function*. Later, when the function is used, it is used like this:

case "$1" in
  stop)
        do_stop
        case "$?" in
                0 | 1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                    ^
                    ^
                    ^
                    ^
                2)     [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;

> Evidence that it breaks:


> [EMAIL PROTECTED]:~$ LANG=C sudo apt-get remove --purge amule-daemon
> [...]
> Removing amule-daemon ...
> invoke-rc.d: initscript amule-daemon, action "stop" failed.
> dpkg: error processing amule-daemon (--purge):
>  subprocess pre-removal script returned error exit status 1
> invoke-rc.d: initscript amule-daemon, action "start" failed.
> dpkg: error while cleaning up:
>  subprocess post-installation script returned error exit status 1
> Errors were encountered while processing:
>  amule-daemon
> E: Sub-process /usr/bin/dpkg returned an error code (1)

OK, I have no idea why it would do that on your system. Please tell me:

  1. what your /bin/sh points to (bash, dash?)
  2. the debugging output of this:

    # /etc/init.d/amule-daemon start
    # /etc/init.d/amule-daemon stop
    # /bin/sh -x /etc/init.d/amule-daemon stop

Cheers,

-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
                          Listening to: Joaquín Sabina - Peces de ciudad



Reply via email to