Dmitrijs Ledkovs <x...@debian.org> 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 (r...@debian.org)               <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to debian-policy-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87obb0r8v3....@windlord.stanford.edu

Reply via email to