diff --git a/inxi b/inxi index 1b5181d..93e3c5a 100755 --- a/inxi +++ b/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 ;;