Salokine a écrit :
> Package: tremulous-server
> Version: 1.1.0-2
> Severity: important
>
>
> Hi,
>
> This a correction of /etc/init.d/tremulous-server
> It's for the package 1.1.0-2 (on Debian/Testing for me)
>
> Bad version of function tremulous_start():
>
>
>
> Code:
>
> tremulous_start() {
> if [ -f $PIDFILE ]; then
> return 2
> fi
>
> start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
> --background --exec $DAEMON --make-pidfile --chuid nobody \
> --$DAEMON_OPTS &> /dev/null || return 1
>
> return 0
> }
>
>
>
>
> Good version
>
> Code:
>
> tremulous_start() {
> if [ -f $PIDFILE ]; then
> return 2
> else
> start-stop-daemon --start --quiet --pidfile $PIDFILE --oknodo \
> --background --exec $DAEMON --make-pidfile --chuid
> nobody \
> --$DAEMON_OPTS &> /dev/null || return 1
> fi
>
> return 0
> }
What's the difference ?
If [ -f $PIDFILE ] is true it will return 2 and the following code won't
be executed. So it doesn't need the "else".
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]