Package: lsb-base
Version: 3.0-4
Severity: normal

Right now, the daemon name is thrown away, after a short check for the
pidfile.  Using the binary name would allow start-stop-daemon to look
for instances of a daemon in cases where there is no pidfile.

Changing:
    if [ ! $pidfile ]; then
        pidfile=/var/run/$(basename "$1").pid
    fi

    if [ $2 ]; then
        sig=$(echo $2 | sed -e 's/^-\(.*\)/\1/')
        sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/')
        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal $sig 
--quiet
        status="$?"
        [ "$status" = 1 ] && return 3 # program is not running
        return 0
    else
        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet 
--oknodo
    fi
to :
    if [ ! $pidfile ]; then
        pidfile=/var/run/$(basename "$1").pid
    fi

    if [ $2 ]; then
        sig=$(echo $2 | sed -e 's/^-\(.*\)/\1/')
        sig=$(echo $sig | sed -e 's/^SIG\(.*\)/\1/')
        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --signal $sig 
--quiet
        status="$?"
        [ "$status" = 1 ] && return 3 # program is not running
        return 0
    else
        /sbin/start-stop-daemon --stop --pidfile "$pidfile" --retry 5 --quiet 
--oknodo --exec "$1"
    fi

should do it.

Thanks,

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.11-9-amd64-k8
Locale: LANG=C, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15) (ignored: 
LC_ALL set to en_US.ISO-8859-15)

Versions of packages lsb-base depends on:
ii  ncurses-bin                   5.4-9      Terminal-related programs and man 
ii  sed                           4.1.4-2    The GNU sed stream editor

lsb-base recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to