empty_block_partition

This commit is contained in:
pvincent
2024-09-01 17:41:57 +04:00
parent d0e43bca01
commit b390c64d79
+1 -2
View File
@@ -111,8 +111,7 @@ projects: []
cluster: null cluster: null
EOF EOF
else 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,FSTYPE,TYPE -ti -P | grep 'FSTYPE="" TYPE="part"' | head -n1 | cut -d'"' -f2)
empty_block_partition=$(lsblk -o NAME,PTTYPE,FSTYPE -ti -P | grep 'PTTYPE="" FSTYPE=""' | head -n1 | cut -d'"' -f2)
if [[ -n "$empty_block_partition" ]]; then if [[ -n "$empty_block_partition" ]]; then
echo "--------------------------------" echo "--------------------------------"
echo "use empty block partition /dev/$empty_block_partition for speed and optimization" echo "use empty block partition /dev/$empty_block_partition for speed and optimization"