From 7b572d73f9a63456db56a57c50e0b0081466089d Mon Sep 17 00:00:00 2001 From: Anders Henke Date: Thu, 25 Feb 2016 13:31:44 +0100 Subject: [PATCH 1/2] Added quotes around directory/file variables to enable working in a path with spaces in its name. --- contrib/create-basic-configdrive | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/create-basic-configdrive b/contrib/create-basic-configdrive index f3eb033483..c49f7dd5ac 100755 --- a/contrib/create-basic-configdrive +++ b/contrib/create-basic-configdrive @@ -171,7 +171,7 @@ CLOUD_CONFIG="${CLOUD_CONFIG//${HNAME}}" echo "$CLOUD_CONFIG" > "$CONFIG_FILE" -mkisofs -R -V config-2 -o $CONFIGDRIVE_FILE $WORKDIR +mkisofs -R -V config-2 -o "$CONFIGDRIVE_FILE" "$WORKDIR" echo echo From eda59ed214e9f6b1458f6230840d237311f96ecc Mon Sep 17 00:00:00 2001 From: Anders Henke Date: Thu, 25 Feb 2016 13:53:03 +0100 Subject: [PATCH 2/2] 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