Skip to content

Commit

Permalink
improve test if classes are defined
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Jul 1, 2021
1 parent 64b6436 commit 116a870
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/fai-diskimage
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ while true ; do
export verbose=1
shift ;;
-c|--class)
export classes=$2
export classes="-c $2"
shift 2 ;;
-C|--cfdir)
cfdir="-C $2 "
Expand Down Expand Up @@ -181,8 +181,8 @@ case $ext in
*) die 8 "Unknown suffix .$ext in name of disk image. Please use raw, qcow2, vdi, vmdk or vhdx."
esac

if [ -z "$classes" ]; then
die 7 "No classes are defined"
if [ -z "$classes" -a -z "$renew" ]; then
die 7 "No classes are defined. Use -c or -N."
fi

: ${cspace:=/srv/fai/config}
Expand Down

0 comments on commit 116a870

Please sign in to comment.