remove custom growfs script

Not applicable or required for ZFS. OPNsense core has its own growfs feature.
https://github.com/opnsense/core/blob/stable/26.1/src/etc/rc
This commit is contained in:
Maurice Walker 2026-03-26 23:41:47 +01:00
parent ebf58ecc4d
commit f6152d5c6e
4 changed files with 2 additions and 31 deletions

View file

@ -250,8 +250,7 @@ package: all
install -m 755 ${PKG_RCDDIR}/fand ${PKG_STAGEDIR}/usr/local/etc/rc.d/
install -m 755 ${PKG_RCDDIR}/mwifiex_uap ${PKG_STAGEDIR}/usr/local/etc/rc.d/
# rc.syshook early scripts
install -m 755 ${PKG_RCDDIR}/01-growfs ${PKG_STAGEDIR}/usr/local/etc/rc.syshook.d/early/
install -m 755 ${PKG_RCDDIR}/02-mono-modules ${PKG_STAGEDIR}/usr/local/etc/rc.syshook.d/early/
install -m 755 ${PKG_RCDDIR}/01-mono-modules ${PKG_STAGEDIR}/usr/local/etc/rc.syshook.d/early/
# OPNsense plugin files (hwmon dashboard widget)
cp -R ${OPSDIR}/plugins/hwmon/src/opnsense/ ${PKG_STAGEDIR}/usr/local/opnsense/
chmod 755 ${PKG_STAGEDIR}/usr/local/opnsense/scripts/hwmon/sensors.py

View file

@ -24,8 +24,7 @@
/usr/local/etc/rc.d/cmm
/usr/local/etc/rc.d/fand
/usr/local/etc/rc.d/mwifiex_uap
/usr/local/etc/rc.syshook.d/early/01-growfs
/usr/local/etc/rc.syshook.d/early/02-mono-modules
/usr/local/etc/rc.syshook.d/early/01-mono-modules
@dir /usr/local/opnsense/scripts/hwmon
/usr/local/opnsense/scripts/hwmon/sensors.py
/usr/local/opnsense/service/conf/actions.d/actions_hwmon.conf

View file

@ -1,27 +0,0 @@
#!/bin/sh
# OPNsense rc.syshook early script — grow root filesystem to fill disk
# Installed to /usr/local/etc/rc.syshook.d/early/01-growfs
#
# On first boot from a freshly written image, the UFS root partition
# is only ~5GB. This expands it to fill the eMMC/SD card.
# Safe to run repeatedly — gpart resize is a no-op when already full,
# and growfs is a no-op when the filesystem already fills the partition.
DISK="mmcsd0"
PART="2"
LABEL="OPNsense_ARM"
# Only act if the partition device exists
if [ ! -e "/dev/${DISK}s${PART}" ]; then
exit 0
fi
# Check if there is free space after our partition
free=$(gpart show "$DISK" 2>/dev/null | grep -c -- '- free -')
if [ "$free" -gt 1 ]; then
# More than just the initial alignment gap — resize needed
echo "growfs: resizing partition ${DISK}s${PART}"
gpart resize -i "$PART" "$DISK"
growfs -y "/dev/ufs/${LABEL}"
echo "growfs: done — $(df -h / | tail -1 | awk '{print $2}') total"
fi

0
rc.d/02-mono-modules → rc.d/01-mono-modules Executable file → Normal file
View file