From eda59ed214e9f6b1458f6230840d237311f96ecc Mon Sep 17 00:00:00 2001 From: Anders Henke Date: Thu, 25 Feb 2016 13:53:03 +0100 Subject: [PATCH] Added simple error message on failed mkisofs. When mkisofs failed, the script would still claim "Success". --- contrib/create-basic-configdrive | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/contrib/create-basic-configdrive b/contrib/create-basic-configdrive index c49f7dd5ac..5f9c4a58c8 100755 --- a/contrib/create-basic-configdrive +++ b/contrib/create-basic-configdrive @@ -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