Package: freeradius Version: 2.0.4+dfsg-6 Severity: important Tags: patch /etc/init.d/freeradius doesn't pass on failures from start-stop-daemon:
# rm /etc/freeradius/radiusd.conf # /etc/init.d/freeradius restart Stopping FreeRADIUS daemon: freeradius. Starting FreeRADIUS daemon: freeradius. The problem is here: if start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM; then ret=$? fi log_end_msg $ret Note that "ret=$?" gets evaluated when start-stop-daemon succeeds rather than fails. "if ! start-stop-daemon" also won't work because in that case $? captures the inverted status. "||" is fine though: --- freeradius-2.0.4+dfsg/debian/freeradius.init~ +++ freeradius-2.0.4+dfsg/debian/freeradius.init @@ -34,18 +34,14 @@ case "$1" in start) log_daemon_msg "Starting $DESCR" "$PROG" - if start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM; then - ret=$? - fi + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $PROGRAM || ret=$? log_end_msg $ret exit $ret ;; stop) log_daemon_msg "Stopping $DESCR" "$PROG" if [ -f "$PIDFILE" ] ; then - if start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE; then - ret=$? - fi + start-stop-daemon --stop --retry=TERM/30/KILL/5 --quiet --pidfile $PIDFILE || ret=$? log_end_msg $ret else log_action_cont_msg "$PIDFILE not found" Thanks, Matej -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org