1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-30 22:50:10 +03:00

Create snapshot self link in qcow2 ln

This commit is contained in:
Javi Fontan 2016-04-08 18:30:04 +02:00
parent b4601a67d0
commit ce5ceb156f

View File

@ -74,7 +74,11 @@ set -ex
mkdir -p "${SNAP_DIR}"
SNAP="\$(ls ${SNAP_DIR} | sort -n | tail -n 1)"
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)"
if [ -z "\${SNAP}" ]; then
SNAP=0