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

Re: On upstart implementing Debian Policy §9.11.1 on behalf of sysv init scripts



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


Reply to: