Add device model to menu partition info
This commit is contained in:
parent
9bc60e09fd
commit
f7c99005f1
@ -5,7 +5,7 @@
|
||||
# Some ideas and code reworked from other resources
|
||||
# AIF, Calamares, and the Arch Wiki.. Credit where credit is due
|
||||
|
||||
VER=2.1.22
|
||||
VER=2.1.23
|
||||
|
||||
# default values {
|
||||
|
||||
@ -699,7 +699,7 @@ part_find()
|
||||
PARTS=""
|
||||
COUNT=0
|
||||
local regexp="$1" err=''
|
||||
local s dev size isize
|
||||
local s dev size isize model
|
||||
|
||||
# string of partitions >= 80M as /TYPE/PART SIZE__FSTYPE
|
||||
while read -r dev size; do
|
||||
@ -708,11 +708,16 @@ part_find()
|
||||
size_t="${s: -1:1}"
|
||||
isize=${s:0:-1}
|
||||
isize=${isize%.*}
|
||||
if [[ $dev = /dev/nvme* ]]; then
|
||||
model=$(lsblk -lno MODEL "${dev%p[1-9]}")
|
||||
else
|
||||
model=$(lsblk -lno MODEL "${dev%[1-9]}")
|
||||
fi
|
||||
if ! [[ $size_t == 'K' || ($size_t == 'M' && $isize -lt 80) ]]; then
|
||||
if [[ $PARTS ]]; then
|
||||
PARTS+=$'\n'"$dev $size"
|
||||
PARTS+=$'\n'"$dev ${size}__$model"
|
||||
else
|
||||
PARTS="$dev $size"
|
||||
PARTS="$dev ${size}__$model"
|
||||
fi
|
||||
(( COUNT++ ))
|
||||
fi
|
||||
|
Reference in New Issue
Block a user