[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#426877: Clarify what "sensible behaviour" is for init scripts

On Sun, 06 Jul 2008, Iñaki Baz Castillo wrote:
> > Note that /etc/init.d/skeleton, on which many init scripts in Debian are
> > based, handles this case correctly without using --oknodo.
> Are you sure? These are the "start" and "stop" sections of skeleton
> file in a Debian Etch:

No those are functions... the main code runs without "set -e" and thus doesn't
fail on the error and the return value of the function is checked:

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

If do_start returns 0 or 1, the whole script returns "0" (hence success).

Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :

Reply to: