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
1 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,9 @@ if [ ! -e /etc/rootpt-resize ] \
then
ROOT_BLK="$(readlink -f /sys/dev/block/"$(awk -e \
'$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]}"
parted -l ---pretend-input-tty << EOI
ok