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

Bug#710559: lintian: init.d-script-call-internal-API contradicts /etc/init.d/skeleton



Josh Triplett <josh@joshtriplett.org> writes:

> /etc/init.d/skeleton is wrong; only sysvinit's own internal scripts
> should use vars.sh directly.  Other scripts should source
> /lib/lsb/init-functions and use the log_* functions.

The code in question does use the log_* functions:

case "$1" in
  start)
        [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
        do_start
        case "$?" in
                0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
                2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
        esac
        ;;

and so forth.  I don't see a substitute interface that does this, which is
part of why I'm confused -- the log_* functions do not check $VERBOSE so
far as I can tell.

What interface are the init scripts supposed to use that mimics the above
behavior?  Or is the above behavior wrong?  I think the Lintian tag
description needs to tell people what to replace the above construct with,
given that we've been telling people to write init scripts like that for
years and there are doubtless *tons* of them in Debian.

New ones will be introduced daily no matter what Lintian says as long as
/etc/init.d/skeleton, which everything tells people to use as a starting
point, has this code.  Is there already a bug open against sysvinit to
change the skeleton script to do something else?

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: