mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-02 00:02:01 +00:00
scripts: extra hypervisor config script entry checks
Add more checks for each entry. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
parent
8cd0d9f0db
commit
491780d6c2
@ -93,6 +93,7 @@ check_tag()
|
||||
local entry="$2"
|
||||
|
||||
[ -z "$tag" ] && die "no tag for entry '$entry'"
|
||||
[ -z "$entry" ] && die "no entry for tag '$tag'"
|
||||
|
||||
value="${recognised_tags[$tag]}"
|
||||
|
||||
@ -108,6 +109,7 @@ check_tags()
|
||||
local entry="$2"
|
||||
|
||||
[ -z "$tags" ] && die "entry '$entry' doesn't have any tags"
|
||||
[ -z "$entry" ] && die "no entry for tags '$tags'"
|
||||
|
||||
tags=$(echo "$tags"|tr ',' '\n')
|
||||
|
||||
@ -146,6 +148,8 @@ show_array()
|
||||
|
||||
for entry in "${_array[@]}"
|
||||
do
|
||||
[ -z "$entry" ] && die "found empty entry"
|
||||
|
||||
tags=$(echo "$entry"|cut -s -d: -f1)
|
||||
elem=$(echo "$entry"|cut -s -d: -f2-)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user