summaryrefslogtreecommitdiffstats
path: root/mcp/scripts/lib_jump_deploy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/scripts/lib_jump_deploy.sh')
-rw-r--r--mcp/scripts/lib_jump_deploy.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh
index 532508a58..3dc3c4436 100644
--- a/mcp/scripts/lib_jump_deploy.sh
+++ b/mcp/scripts/lib_jump_deploy.sh
@@ -124,11 +124,15 @@ function __mount_image {
sudo kpartx -av "${OPNFV_NBD_DEV}"
# Hardcode partition index to 1, unlikely to change for Ubuntu UCA image
sudo partx -uvn 1:1 "${OPNFV_NBD_DEV}"
- if [[ "${MCP_OS:-}" =~ ubuntu1604 ]] && sudo growpart "${OPNFV_NBD_DEV}" 1
+ if [[ "${MCP_OS:-}" =~ ubuntu ]] && sudo growpart "${OPNFV_NBD_DEV}" 1
then
+ if [ -e "${image_dir}/e2fsprogs" ]; then
+ E2FSCK_PREFIX="${image_dir}/e2fsprogs/e2fsck/"
+ RESIZE_PREFIX="${image_dir}/e2fsprogs/resize/"
+ fi
sudo kpartx -u "${OPNFV_NBD_DEV}"
- sudo e2fsck -pf "${OPNFV_MAP_DEV}"
- sudo resize2fs "${OPNFV_MAP_DEV}"
+ sudo "${E2FSCK_PREFIX}e2fsck" -pf "${OPNFV_MAP_DEV}"
+ sudo "${RESIZE_PREFIX}resize2fs" "${OPNFV_MAP_DEV}"
else
sleep 5 # /dev/nbdNp1 takes some time to come up
fi