mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
optimized a bit to reduce fs checks
This commit is contained in:
parent
1de0becffc
commit
2e75681f83
12
inxi
12
inxi
|
@ -3322,14 +3322,18 @@ get_partition_uuid_label_data()
|
|||
# only run these tests once per directory to avoid excessive queries to fs
|
||||
case $1 in
|
||||
label)
|
||||
if [[ -d /dev/disk/by-label && $B_LABEL_SET != 'true' ]];then
|
||||
DEV_DISK_LABEL="$( ls -l /dev/disk/by-label )"
|
||||
if [[ $B_LABEL_SET != 'true' ]];then
|
||||
if [[ -d /dev/disk/by-label ]];then
|
||||
DEV_DISK_LABEL="$( ls -l /dev/disk/by-label )"
|
||||
fi
|
||||
B_LABEL_SET='true'
|
||||
fi
|
||||
;;
|
||||
uuid)
|
||||
if [[ -d /dev/disk/by-uuid && $B_UUID_SET != 'true' ]];then
|
||||
DEV_DISK_UUID="$( ls -l /dev/disk/by-uuid )"
|
||||
if [[ $B_UUID_SET != 'true' ]];then
|
||||
if [[ -d /dev/disk/by-uuid ]];then
|
||||
DEV_DISK_UUID="$( ls -l /dev/disk/by-uuid )"
|
||||
fi
|
||||
B_UUID_SET='true'
|
||||
fi
|
||||
;;
|
||||
|
|
Loading…
Reference in a new issue