mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
Bug #4768: attach_disk in qcow2 fails
This commit is contained in:
parent
388c183562
commit
f8520b7a36
@ -141,7 +141,7 @@ fi
|
||||
REGISTER_CMD=$(cat <<EOF
|
||||
set -e -o pipefail
|
||||
|
||||
FORMAT=\$($QEMU_IMG info $TMP_DST | grep "^file format:" | awk '{print \$3}')
|
||||
FORMAT=\$($QEMU_IMG info $TMP_DST | grep "^file format:" | awk '{print \$3}' || :)
|
||||
|
||||
if [ "\$FORMAT" != "raw" ]; then
|
||||
$QEMU_IMG convert -O raw $TMP_DST $TMP_DST.raw
|
||||
|
@ -102,7 +102,7 @@ if [ ! -L "${SNAP_DIR}/${SNAP_NAME}" ]; then
|
||||
ln -s "${SNAP_DIR}" "${SNAP_DIR}/${SNAP_NAME}"
|
||||
fi
|
||||
|
||||
SNAP="\$(ls ${SNAP_DIR} | grep '^[[:digit:]]*$' | sort -n | tail -n 1)"
|
||||
SNAP="\$(ls ${SNAP_DIR} | grep '^[[:digit:]]*$' | sort -n | tail -n 1 || :)"
|
||||
|
||||
if [ -z "\${SNAP}" ]; then
|
||||
SNAP=0
|
||||
|
Loading…
x
Reference in New Issue
Block a user