Check if dest already exist
This commit is contained in:
parent
8ad79d1787
commit
cd92aa3e7c
|
@ -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..."
|
||||
|
|
Loading…
Reference in New Issue