Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

contrib: add support for Mac OS X hdiutil #579

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions contrib/create-basic-configdrive
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -175,7 +180,7 @@ CLOUD_CONFIG="${CLOUD_CONFIG/<HOSTNAME>/${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
Expand Down