Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
#298: Allow resize on non rootfs partitions
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 authored Jun 7, 2023
1 parent fd3ccb0 commit 02456a6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/etc/one-context.d/loc-05-grow-rootfs
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
;;
Expand All @@ -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 \
Expand Down

0 comments on commit 02456a6

Please sign in to comment.