Browse Source

99base: warn on invalid command for initqueue

When 'initqueue' is called with an invalid command it'll generate
invalid job scripts. This will lead to confusing error messages
later on.
So abort in these cases and print out a warning.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
master
Hannes Reinecke 10 years ago committed by Harald Hoyer
parent
commit
7c2311660f
  1. 4
      modules.d/99base/initqueue.sh

4
modules.d/99base/initqueue.sh

@ -42,6 +42,10 @@ exe=$1 @@ -42,6 +42,10 @@ exe=$1
shift

[ -x "$exe" ] || exe=$(command -v $exe)
if [ -z "$exe" ] ; then
echo "Invalid command"
exit 1
fi

{
[ -n "$onetime" ] && echo '[ -e "$job" ] && rm -f -- "$job"'

Loading…
Cancel
Save