Added simple error message on failed mkisofs.

When mkisofs failed, the script would still claim "Success".
This commit is contained in:
Anders Henke 2016-02-25 13:53:03 +01:00
parent 7b572d73f9
commit eda59ed214

View File

@ -173,8 +173,13 @@ echo "$CLOUD_CONFIG" > "$CONFIG_FILE"
mkisofs -R -V config-2 -o "$CONFIGDRIVE_FILE" "$WORKDIR"
echo
echo
echo "Success! The config-drive image was created on ${CONFIGDRIVE_FILE}"
if [ "$?" -eq 0 ] ; then
echo
echo
echo "Success! The config-drive image was created on ${CONFIGDRIVE_FILE}"
else
echo
echo
echo "Failure! The config-drive image was not created on ${CONFIGDRIVE_FILE}"
fi
# vim: ts=4 et