Dmitrijs Ledkovs <[email protected]> writes:

> Thus in a bug report 712763 [4], included below, I instead propose
> instead shipping slightly larger block of code in the upstart package
> which is sourced by /lib/lsb/init-functions from init-functions.d
> directory. Something along the lines of:

> if init_is_upstart; then
>     upstart_job=/etc/init/$(basename ${0:-}).conf
>     if [ -f ${upstart_job:-} ] && [ ! -L ${upstart_job:-} ]; then
>         case "${1:-}" in
>             start|restart|force-reload)
>                 exit 1
>                 ;;
>             stop)
>                 exit 0
>                 ;;
>         esac
>     fi
> fi

Libraries, even shell libraries, should generally not call exit.  It's
very surprising behavior.  The overall program flow should remain under
the control of the main program.

-- 
Russ Allbery ([email protected])               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to