/lib/init/vars.sh returns non-zero for non-error status

Bug #83741 reported by Noah Slater
4
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: initscripts

Sourcing /lib/init/vars.sh returns non-zero from the following line:

[ "$INIT_VERBOSE" ] && VERBOSE="$INIT_VERBOSE"

Not having $INIT_VERBOSE set IS NOT an error condition and "|| true" should be appended to this last line.

Any init scripts sourcing this file with "set -e" will fail.

Related branches

Changed in sysvinit:
importance: Undecided → Medium
status: Unconfirmed → In Progress
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :
Changed in sysvinit:
status: In Progress → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

Any shells that failed due to this are in violation of POSIX, as 'set -e' is not supposed to cause a failure due to the first part of an AND list. See http://www.opengroup.org/onlinepubs/009695399/utilities/set.html:

-e
    When this option is on, if a simple command fails for any of the reasons listed in Consequences of Shell Errors or returns an exit status value >0, and is not part of the compound list following a while, until, or if keyword, and is not a part of an AND or OR list, and is not a pipeline preceded by the ! reserved word, then the shell shall immediately exit.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.