Package: yiff-server
Version: 2.14.2-7
Severity: normal

The init.d script for yiff-server does not check if yiff-server started
correctly. Under some circumstances (/dev/dsp being locked by another
application [1]) this might lead to users believeing the server started
up correctly when it did not.

The init.d script should check if the daemon started right after calling
start-stop-daemon and provide a meaningful message if it didn't.

For example, this is what I've been using in some init.d scripts (but
there might be better alternatives if using LSB):

running()
{
    # No pidfile, probably no daemon present
    #
    [ ! -f "$PIDFILE" ] && return 1
    pid=`cat $PIDFILE`
    # No pid, probably no daemon present
    [ -z "$pid" ] && return 1
    [ ! -d /proc/$pid ] &&  return 1
    cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
    [ "$cmd" != "$NAME" ] &&  return 1
    return 0
}

And then change the start action to do:

(...)
    start-stop-daemon (...)
    if running ;  then
       echo "$NAME."
    else
       echo "ERROR."
       exit 1
    fi

Regards

Javier



[1] Happened to me when using Mozilla with the Flash plugin and an audio
application

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27-2-686
Locale: LANG=es_ES, LC_CTYPE=es_ES (charmap=ISO-8859-1)

Versions of packages yiff-server depends on:
ii  debconf [debconf-2.0]         1.4.58     Debian configuration management sy
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an
ii  liby2-14                      2.14.2-7   Y Sound Server Library

yiff-server recommends no packages.

-- debconf information excluded


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

Reply via email to