Resize root only for mmc

This commit is contained in:
Lee Miller 2023-12-06 01:35:30 +02:00
parent e107bcbe92
commit 2fc39b6c39
Signed by: lee.miller
GPG Key ID: 4F97A5EA88F4AB63

View File

@ -6,7 +6,9 @@ if [ ! -e /etc/rootpt-resize ] \
then then
ROOT_BLK="$(readlink -f /sys/dev/block/"$(awk -e \ ROOT_BLK="$(readlink -f /sys/dev/block/"$(awk -e \
'$9=="/dev/root"{print $3}' /proc/self/mountinfo)")" '$9=="/dev/root"{print $3}' /proc/self/mountinfo)")"
ROOT_DISK="/dev/$(basename "${ROOT_BLK%/*}")" DEV_NAME=$(basename "${ROOT_BLK%/*}")
[ ${DEV_NAME%%[0-9]*} == mmcblk ] || exit 1
ROOT_DISK="/dev/${DEV_NAME}"
ROOT_PART="${ROOT_BLK##*[^0-9]}" ROOT_PART="${ROOT_BLK##*[^0-9]}"
parted -l ---pretend-input-tty << EOI parted -l ---pretend-input-tty << EOI
ok ok