mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
(change version)
updated to handle new /sys/block syntax to get device name for disks. This will require further work to actually make solid, but this fix makes it work for now.
This commit is contained in:
parent
c90ed16e7b
commit
7f3c89b63c
11
inxi
11
inxi
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.3.12
|
||||
#### Date: February 5 2010
|
||||
#### version: 1.3.13
|
||||
#### Date: February 6 2010
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -2579,6 +2579,7 @@ get_hard_drive_data_advanced()
|
|||
local sd_ls_by_id='' ls_disk_by_id=''
|
||||
|
||||
## check for all ide type drives, non libata, only do it if hdx is in array
|
||||
## this is now being updated for new /sys type paths, this may handle that ok too
|
||||
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++ ))
|
||||
|
@ -2650,7 +2651,11 @@ get_hard_drive_data_advanced()
|
|||
IFS=","
|
||||
a_temp_working=( ${A_HDD_DATA[$i]} )
|
||||
IFS="$ORIGINAL_IFS"
|
||||
if [[ ${#a_temp_scsi[@]} -gt 0 ]];then
|
||||
# /sys/block/[sda,hda]/device/model
|
||||
# this is handles the new /sys data types first
|
||||
if [[ -e /sys/block/${a_temp_working[0]}/device/model ]];then
|
||||
a_temp_working[2]="$( remove_erroneous_chars /sys/block/${a_temp_working[0]}/device/model )"
|
||||
elif [[ ${#a_temp_scsi[@]} -gt 0 ]];then
|
||||
for (( j=0; j < ${#a_temp_scsi[@]}; j++ ))
|
||||
do
|
||||
## ok, ok, it's incomprehensible, search /dev/disk/by-id for a line that contains the
|
||||
|
|
Loading…
Reference in a new issue