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
parent
bd44831b82
commit
7c2311660f
|
|
@ -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…
Reference in New Issue