mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
Changed failure to find device name to: Name n/a
This commit is contained in:
parent
cace45adb5
commit
16024b6ade
6
inxi
6
inxi
|
@ -1193,7 +1193,7 @@ get_hard_drive_data_advanced()
|
|||
{
|
||||
local a_temp_working='' a_temp_scsi='' temp_holder='' temp_name='' i='' j=''
|
||||
|
||||
## next check for all ide type drives, non libata, only do it if hdx is in array
|
||||
## check for all ide type drives, non libata, only do it if hdx is in array
|
||||
if [[ -n $( egrep 'hd[a-z]' <<< ${A_HDD_DATA[@]} ) ]];then
|
||||
# remember, we're using the last array item to store the total size of disks
|
||||
for (( i=0; i < ${#A_HDD_DATA[@]} - 1; i++ ))
|
||||
|
@ -1205,7 +1205,7 @@ get_hard_drive_data_advanced()
|
|||
if [[ -e /proc/ide/${a_temp_working[0]}/model ]];then
|
||||
a_temp_working[2]="$( remove_erroneous_chars /proc/ide/${a_temp_working[0]}/model )"
|
||||
else
|
||||
a_temp_working[2]="Error"
|
||||
a_temp_working[2]="Name n/a"
|
||||
fi
|
||||
# these loops are to easily extend the cpu array created in the awk script above with more fields per cpu.
|
||||
for (( j=0; j < ${#a_temp_working[@]}; j++ ))
|
||||
|
@ -1262,7 +1262,7 @@ get_hard_drive_data_advanced()
|
|||
# if [[ -n $( ls -l /dev/disk/by-id | egrep -m1 ".*/USB.*${a_temp_working[0]}$" ) ]];then
|
||||
#
|
||||
# else
|
||||
a_temp_working[2]="Error"
|
||||
a_temp_working[2]="Name n/a"
|
||||
# fi
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue