adding support for debian genisoimage

This commit is contained in:
Alessandro -oggei- Ogier 2016-05-06 14:24:58 +02:00
parent af38bc6df4
commit fbe60fa3fb

View File

@ -68,9 +68,13 @@ if [ $(id -u) -eq 0 ]; then
exit 1 exit 1
fi fi
# mkisofs tool check # mkisofs/genisoimage tool check
if ! which mkisofs &>/dev/null; then if which mkisofs &>/dev/null; then
echo "$0: mkisofs tool is required to create image." >&2 mkisofs=$(which mkisofs)
elif which genisoimage &>/dev/null; then
mkisofs=$(which genisoimage)
else
echo "$0: mkisofs or genisoimage tool is required to create image." >&2
exit 1 exit 1
fi fi
@ -171,7 +175,7 @@ CLOUD_CONFIG="${CLOUD_CONFIG/<HOSTNAME>/${HNAME}}"
echo "$CLOUD_CONFIG" > "$CONFIG_FILE" echo "$CLOUD_CONFIG" > "$CONFIG_FILE"
mkisofs -R -V config-2 -o "$CONFIGDRIVE_FILE" "$WORKDIR" $mkisofs -R -V config-2 -o "$CONFIGDRIVE_FILE" "$WORKDIR"
if [ "$?" -eq 0 ] ; then if [ "$?" -eq 0 ] ; then
echo echo