Check if dest already exist

This commit is contained in:
admin666 2023-11-22 08:25:35 +01:00
parent 8ad79d1787
commit cd92aa3e7c
1 changed files with 5 additions and 3 deletions

View File

@ -75,9 +75,11 @@ mkdir -p /mnt/${vm}
mkdir -p /mnt/${vm}-remote
mkdir -p $(dirname ${dest})
# Creating new disk
# Creating new disk if necessary
if [ ! -e ${dest} ]; then
echo "Creating new disk..."
cp --reflink ${generic_image} ${dest}
fi
# Mounting
echo "Mounting devices..."