From e9dff464cd9192b81d79e85cefa34be91fb3bfe7 Mon Sep 17 00:00:00 2001 From: oiseauroch Date: Tue, 29 Nov 2022 15:00:52 +0100 Subject: [PATCH] fix script --- conf/mount_disk.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/conf/mount_disk.sh b/conf/mount_disk.sh index 08f6795..c72071d 100755 --- a/conf/mount_disk.sh +++ b/conf/mount_disk.sh @@ -1,7 +1,7 @@ #!/bin/bash if [ "$VIRTUALISATION" = "true" ] then - final_path=__FINALPATH__ + datadir=__DATADIR__ format=$1 i=0 while $(fdisk -l /dev/nbd$i 1&>2 /dev/null) @@ -10,10 +10,11 @@ then done echo $i modprobe nbd max_part=$(( i + 1 )) - qemu-nbd --connect /dev/nbd$i $final_path/garage_data.qcow2 + qemu-nbd --connect /dev/nbd$i $datadir/garage_data.qcow2 if [[ "$format" = "true" ]] then mkfs.ext4 /dev/nbd$i > /dev/null fi + mkdir -p $datadir/data mount /dev/nbd$i $datadir/data/ fi