added some hdd output tweaks

This commit is contained in:
inxi-svn 2008-10-31 07:21:57 +00:00
parent 312a53e3b9
commit 84feed2d45

6
inxi
View file

@ -46,7 +46,9 @@ CPU_MODEL=''
CPU_CLOCK=''
CPU_FLAGS=''
HDD_CAPACITY=''
HDD_MODEL='' ## note, can't declare this or it adds a comma in list of disks in get_hdd_data
#: note: if this is declared, whatever string you want inserted will be inserted first
## in this case, it's desirable to print out (x) before each driver found.
HDD_MODEL=''
HDD_USED=''
IRC_CLIENT=''
IRC_CLIENT_VERSION=''
@ -1076,6 +1078,7 @@ get_hard_drive_data()
break
fi
(( disk_capacity+=$( remove_erroneous_chars $disk/capacity ) ))
# this adds the (x) numbering in front of each disk found, and creates the full disk string
HDD_MODEL="${HDD_MODEL}${HDD_MODEL+ ${C1}($i)${C2}}$( remove_erroneous_chars $disk/model )"
((i++))
fi
@ -1107,6 +1110,7 @@ get_hard_drive_data()
for (( i=0; i < ${#a_total_hdd[@]}; i++ ))
do
# this adds the (x) numbering in front of each disk found, and creates the full disk string
HDD_MODEL="${HDD_MODEL}${HDD_MODEL+ ${C1}($(($i+1)))${C2}}${a_total_hdd[i]}"
done
if [ -z "$HDD_MODEL" ];then