optimized a bit to reduce fs checks

This commit is contained in:
inxi-svn 2010-09-16 21:31:23 +00:00
parent 1de0becffc
commit 2e75681f83

8
inxi
View file

@ -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
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
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
;;