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 /mnt/${vm}-remote
|
||||||
mkdir -p $(dirname ${dest})
|
mkdir -p $(dirname ${dest})
|
||||||
|
|
||||||
# Creating new disk
|
# Creating new disk if necessary
|
||||||
echo "Creating new disk..."
|
if [ ! -e ${dest} ]; then
|
||||||
cp --reflink ${generic_image} ${dest}
|
echo "Creating new disk..."
|
||||||
|
cp --reflink ${generic_image} ${dest}
|
||||||
|
fi
|
||||||
|
|
||||||
# Mounting
|
# Mounting
|
||||||
echo "Mounting devices..."
|
echo "Mounting devices..."
|
||||||
|
|
Loading…
Reference in New Issue