From fbcae7276b1c31bba12ddc1deb7e9e1b30207430 Mon Sep 17 00:00:00 2001 From: mglae Date: Mon, 16 Jan 2023 19:30:15 +0100 Subject: [PATCH] installer: fix device detection with pmbr_boot flag set Failing on e.g. "/dev/sda:512GB:scsi:512:512:gpt:ATA Samsung SSD 850:pmbr_boot;" Fixed by only matching the device name when removing rpmb and boot devices RE was added for MMC support in #9d1d032 and removes special MMC areas like /dev/mmcblk0rmpb or /dev/mmcblk0boot1 --- packages/tools/installer/scripts/installer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tools/installer/scripts/installer b/packages/tools/installer/scripts/installer index 2491a84700..f3b7f543e9 100755 --- a/packages/tools/installer/scripts/installer +++ b/packages/tools/installer/scripts/installer @@ -78,7 +78,7 @@ get_device_unmount() { # provides: DEVICES DEVICES="" - DEVICES=$(parted -s -m -l 2>/dev/null | grep -E '^/dev/sd|^/dev/mmcblk|^/dev/nvme' | grep -E -v '.?rpmb|.?boot?' | cut -f1 -d ":") + DEVICES=$(parted -s -m -l 2>/dev/null | grep -E '^/dev/sd|^/dev/mmcblk|^/dev/nvme' | grep -E -v '^[^:]*rpmb|^[^:]*boot' | cut -f1 -d ":") for i in $(cat /proc/mounts | grep -E '^/dev/sd' | cut -f1 -d " " | sed "s/[0-9].*$//"); do DEVICES=$(echo $DEVICES | sed -e "s|$i||")