Only list disk
devices for partitioning
This commit is contained in:
parent
36c3844526
commit
675070e617
1 changed files with 7 additions and 1 deletions
|
@ -10,7 +10,13 @@ function chooseDisk() {
|
|||
|
||||
while read disk
|
||||
do
|
||||
disks+=("$disk");
|
||||
local -a diskInfo;
|
||||
diskInfo=($disk);
|
||||
|
||||
if [ "${diskInfo[2]}" == "TYPE" ] || [ "${diskInfo[2]}" == "disk" ]
|
||||
then
|
||||
disks+=("$disk");
|
||||
fi;
|
||||
done < <(lsblk -do NAME,SIZE,TYPE);
|
||||
|
||||
diskCount="$(expr "${#disks[@]}" - 1)";
|
||||
|
|
Loading…
Reference in a new issue