diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-07-01 16:20:19 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2019-07-01 16:20:19 +0200 |
commit | c7914e0d45d71c3d55eaf5370e0b707a5332e674 (patch) | |
tree | 05997e533def6f305c531978f7d456358ffcbbb9 /mcp/scripts/lib_jump_deploy.sh | |
parent | 248b456255f831b27e458e2cd8bd0f449be11434 (diff) |
[lib] Limit cloud img partition resize to Xenial
All cloud images except Ubuntu Xenial (CentOS 7, Ubuntu 18.04) already
have enough free space on the predefined partitions, so skip the resize
to avoid dealing with the newer e2fsprogs required by Ubuntu 18.04.
Change-Id: I184590e631c76910e7c3169dc7bee3c5902ebaf1
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts/lib_jump_deploy.sh')
-rw-r--r-- | mcp/scripts/lib_jump_deploy.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh index d3ccd6e69..40910f453 100644 --- a/mcp/scripts/lib_jump_deploy.sh +++ b/mcp/scripts/lib_jump_deploy.sh @@ -124,7 +124,8 @@ 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 sudo growpart "${OPNFV_NBD_DEV}" 1; then + if [[ "${MCP_OS:-}" =~ ubuntu1604 ]] && sudo growpart "${OPNFV_NBD_DEV}" 1 + then sudo kpartx -u "${OPNFV_NBD_DEV}" sudo e2fsck -pf "${OPNFV_MAP_DEV}" sudo resize2fs "${OPNFV_MAP_DEV}" |