From b390c64d793a94fba49871864e45aacca9fa0cac Mon Sep 17 00:00:00 2001 From: pvincent Date: Sun, 1 Sep 2024 17:41:57 +0400 Subject: [PATCH] empty_block_partition --- lib/install.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/install.sh b/lib/install.sh index f8d238f..c10517e 100755 --- a/lib/install.sh +++ b/lib/install.sh @@ -111,8 +111,7 @@ projects: [] cluster: null EOF else - #empty_block_partition=$(lsblk -o NAME,FSTYPE,GROUP --noheadings -p | grep -E ^.─ | grep disk | awk '{if($3=="") print $1}' | cut -d'/' -f3) - empty_block_partition=$(lsblk -o NAME,PTTYPE,FSTYPE -ti -P | grep 'PTTYPE="" FSTYPE=""' | head -n1 | cut -d'"' -f2) + empty_block_partition=$(lsblk -o NAME,FSTYPE,TYPE -ti -P | grep 'FSTYPE="" TYPE="part"' | head -n1 | cut -d'"' -f2) if [[ -n "$empty_block_partition" ]]; then echo "--------------------------------" echo "use empty block partition /dev/$empty_block_partition for speed and optimization"