diff --git a/contrib/create-basic-configdrive b/contrib/create-basic-configdrive index ece7849c6c..ec07278c70 100755 --- a/contrib/create-basic-configdrive +++ b/contrib/create-basic-configdrive @@ -71,10 +71,15 @@ fi # mkisofs/genisoimage tool check if which mkisofs &>/dev/null; then mkisofs=$(which mkisofs) + mkisofs_opts="-R -V config-2" elif which genisoimage &>/dev/null; then mkisofs=$(which genisoimage) + mkisofs_opts="-R -V config-2" +elif which hdiutil &>/dev/null; then + mkisofs=$(which hdiutil) + mkisofs_opts="makehybrid -iso -joliet -default-volume-name config-2" else - echo "$0: mkisofs or genisoimage tool is required to create image." >&2 + echo "$0: mkisofs, genisoimage, or hdiutil tool is required to create image." >&2 exit 1 fi @@ -175,7 +180,7 @@ CLOUD_CONFIG="${CLOUD_CONFIG//${HNAME}}" echo "$CLOUD_CONFIG" > "$CONFIG_FILE" -$mkisofs -R -V config-2 -o "$CONFIGDRIVE_FILE" "$WORKDIR" +$mkisofs $mkisofs_opts -o "$CONFIGDRIVE_FILE" "$WORKDIR" if [ "$?" -eq 0 ] ; then echo