Comment 17 for bug 66002

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Actually, we have to check $1 as well - $UPSTART_EVENT is not reset if the stop command is by exit, so it still contains "runlevel" because that's what started the job.

        if [ "${UPSTART_EVENT}" = "runlevel" -a "$1" != "S" ]
        then
            exit 100
        fi

Seems right