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 committed Jun 7, 2023
1 parent 5c02be9 commit 8895821
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/etc/one-context.d/loc-05-grow-rootfs
Original file line number Diff line number Diff line change
Expand Up @@ -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=$?
;;
Expand All @@ -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 \
Expand Down

0 comments on commit 8895821

Please sign in to comment.