The file scripts/storage/secondary/cloud-install-sys-tmplt had a syntax error:
The comparison is wrong too.There appear to be quite a few of them. You want an INTEGER compare via '-eq' and not a STRING compare via '=' or '!='. I suggest fixing the entire script.
-- Cloud Services Architect, Senior System Administrator InfoRelay Online Systems (www.inforelay.com)