diff --git a/src/etc/one-context.d/loc-05-grow-rootfs b/src/etc/one-context.d/loc-05-grow-rootfs index c4a1a89..4e742c3 100755 --- a/src/etc/one-context.d/loc-05-grow-rootfs +++ b/src/etc/one-context.d/loc-05-grow-rootfs @@ -186,16 +186,19 @@ esac 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 +# TODO: Check OS first, then iterate FS +for _FS in ${GROW_FS} ; do # 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 +210,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 \