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 2014-12-11 15:46:10 +01:00 committed by Harald Hoyer
parent bd44831b82
commit 7c2311660f
1 changed files with 4 additions and 0 deletions

View File

@ -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"'