Commit e75cdd1e authored by Nikos Skalkotos's avatar Nikos Skalkotos

verify: Check if IMG_FORMAT has a sane value

Check the content of IMG_FORMAT variable. Not just the presence.

This resolves #95
parent b77b40c1
......@@ -46,6 +46,13 @@ check_required() {
if [[ ! "${IMG_FORMAT}" =~ ^(disk|ext|ntfs)dump$ ]]; then
log_error "Invalid OS API Parameter img_format (=${IMG_FORMAT})."
log_error "Valid values are \`diskdump', \`extdump' and \`ntfsdump'"
exit 1
if [ -n "${OS_PRODUCT_KEY+dummy}" ]; then
if [[ ! "${OS_PRODUCT_KEY}" =~ ^([a-zA-Z0-9]{5}-){4}[a-zA-Z0-9]{5}$ ]]; then
log_error "Invalid OS API Parameter: os_product_key."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment