Revert "use freebsd built in growfs script (#3810)"

Breaks our default Nano image growfs, the only use case we have.

This reverts commit 7fe5fe52dcc948d8988f995905efeab8d96af144.
This reverts commit 16efb9aa348124b1d5d9755f40c67df8124698ba.
This commit is contained in:
Franco Fichtner 2020-03-30 12:16:19 +02:00
parent 5274bc634c
commit a4c6003bc2

View File

@ -69,6 +69,15 @@ while read FS_PART FS_MNT FS_TYPE FS_MORE; do
fi
FS_DEV=$(echo ${FS_PART} | awk 'match($0, /^\/dev\/(gpt|ufs)\/.+$/) { print substr( $0, RSTART + 5, RLENGTH - 5 )}')
if [ -n "${FS_DEV}" ]; then
FS_DEV=$(glabel status -as | grep ${FS_DEV} | awk 'match($3, /^[a-z]+[0-9]+/) { print substr( $3, RSTART, RLENGTH )}')
if [ "${FS_MNT}" = "/" -a -f ${GROWFS_MARKER} ]; then
# hammertime!
gpart recover ${FS_DEV}
gpart resize -i 1 ${FS_DEV}
growfs -y ${FS_MNT}
fi
fi
if [ -z "${FS_DEV}" ]; then
FS_DEV=$(echo ${FS_PART} | awk 'match($0, /^\/dev\/[a-z]+[0-9]+/) { print substr( $0, RSTART + 5, RLENGTH - 5 )}')
fi
@ -87,11 +96,6 @@ while read FS_PART FS_MNT FS_TYPE FS_MORE; do
fi
done < /etc/fstab
if [ -f ${GROWFS_MARKER} ]; then
# hammertime!
/etc/rc.d/growfs onestart
fi
attempts=0
while [ ${attempts} -lt 3 ]; do
if [ -n "${ROOT_IS_UFS}" ]; then