From 889582142a3d6028ef37b6d2bd885aa889d091aa Mon Sep 17 00:00:00 2001 From: Daniel Clavijo Coca Date: Wed, 7 Jun 2023 08:08:36 -0600 Subject: [PATCH] OpenNebula/addon-context-linux#298: Allow resize on non rootfs partitions --- src/etc/one-context.d/loc-05-grow-rootfs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/etc/one-context.d/loc-05-grow-rootfs b/src/etc/one-context.d/loc-05-grow-rootfs index c4a1a89..4f68a03 100755 --- a/src/etc/one-context.d/loc-05-grow-rootfs +++ b/src/etc/one-context.d/loc-05-grow-rootfs @@ -188,14 +188,15 @@ export DEBUG _exit_result=0 for _FS in ${GROW_FS} ; do - # avoid resizing FS on FreeBSD - # https://github.com/OpenNebula/addon-context-linux/issues/298 - [ "${OS}" = 'freebsd' ] && continue - # FreeBSD + # only non rootfs resize is supported if [ "${OS}" = 'freebsd' ]; then case "$_FS" in /) + # avoid resizing rootFS on FreeBSD + # https://github.com/OpenNebula/addon-context-linux/issues/298 + continue + # This breaks the image unless executed manually /etc/rc.d/growfs onestart || _exit_result=$? ;; @@ -207,7 +208,6 @@ for _FS in ${GROW_FS} ; do fi # Linux - # try /proc/mounts first otherwise fallback to /etc/mtab MOUNT_LINE=$(\ if [ -e /proc/mounts ] ; then \