Ubuntu-Solutions-Engineering/cloud-installer — pull request #121 by mikemccracken (2014-07-31 18:30:46+00:00)
Title: handle case where 'cloud-install -u' is called when no file exists

since cloud-install calls this script with either '-u' or '-u install-type' , we check what $1 is.
if #args is 1 and it's not -u, then we're probably calling this script directly as before, and $1 is the install type, so grab that into WHAT
if #args is 1 and it is -u, we need to rely on the autodetect.

if #args is 2, we're probably getting a specific type from the script, so just use $2.