summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/scripts/lib.sh')
-rw-r--r--mcp/scripts/lib.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh
index 5be4c556d..7d57fcf5f 100644
--- a/mcp/scripts/lib.sh
+++ b/mcp/scripts/lib.sh
@@ -120,7 +120,7 @@ function mount_image {
break
fi
done
- OPNFV_LOOP_DEV=$(losetup -f)
+ OPNFV_LOOP_DEV=$(sudo losetup -f)
OPNFV_MAP_DEV=/dev/mapper/$(basename "${OPNFV_NBD_DEV}")p1
export OPNFV_MNT_DIR OPNFV_LOOP_DEV
[ -n "${OPNFV_NBD_DEV}" ] && [ -n "${OPNFV_LOOP_DEV}" ] || exit 1
@@ -213,7 +213,7 @@ function cleanup_mounts {
fi
fi
if [ -n "${OPNFV_LOOP_DEV}" ] && \
- losetup "${OPNFV_LOOP_DEV}" 1>&2 > /dev/null; then
+ sudo losetup "${OPNFV_LOOP_DEV}" 1>&2 > /dev/null; then
sudo losetup -d "${OPNFV_LOOP_DEV}"
fi
if [ -n "${OPNFV_NBD_DEV}" ]; then