mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
handling of tsst corp string
This commit is contained in:
parent
ecb4e51a59
commit
bff32dc844
16
inxi
16
inxi
|
@ -4548,8 +4548,7 @@ get_optical_drive_data()
|
||||||
sys_path=$( ls /sys/devices/pci*/*/host*/target*/*/block/$disk/uevent 2>/dev/null | sed "s|/block/$disk/uevent||" )
|
sys_path=$( ls /sys/devices/pci*/*/host*/target*/*/block/$disk/uevent 2>/dev/null | sed "s|/block/$disk/uevent||" )
|
||||||
# no need to test for errors yet, probably other user systems will require some alternate paths though
|
# no need to test for errors yet, probably other user systems will require some alternate paths though
|
||||||
if [[ -n $sys_path ]];then
|
if [[ -n $sys_path ]];then
|
||||||
vendor=$( cat $sys_path/vendor 2>/dev/null | \
|
vendor=$( cat $sys_path/vendor 2>/dev/null | sed -e 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
||||||
sed -E -e 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' -e 's/TSSTcorp/TSST /' -e 's/('"$BAN_LIST_NORMAL"')//g' )
|
|
||||||
model=$( cat $sys_path/model 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
model=$( cat $sys_path/model 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
||||||
state=$( cat $sys_path/state 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
state=$( cat $sys_path/state 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
||||||
rev_number=$( cat $sys_path/rev 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
rev_number=$( cat $sys_path/rev 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
||||||
|
@ -4557,6 +4556,19 @@ get_optical_drive_data()
|
||||||
elif [[ -e /proc/ide/$disk/model ]];then
|
elif [[ -e /proc/ide/$disk/model ]];then
|
||||||
vendor=$( cat /proc/ide/$disk/model 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
vendor=$( cat /proc/ide/$disk/model 2>/dev/null | sed 's/^[[:space:]]*//;s/[[:space:]]*$//;s/,//g' )
|
||||||
fi
|
fi
|
||||||
|
if [[ -n $vendor ]];then
|
||||||
|
vendor=$( gawk '
|
||||||
|
BEGIN {
|
||||||
|
IGNORECASE=1
|
||||||
|
}
|
||||||
|
{
|
||||||
|
gsub(/'"$BAN_LIST_NORMAL"'/, "", $0)
|
||||||
|
sub(/TSSTcorp/, "TSST ", $0) # seen more than one of these weird ones
|
||||||
|
print $0
|
||||||
|
}
|
||||||
|
' <<< $vendor
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $B_EXTRA_DATA == 'true' && -n $proc_cdrom ]];then
|
if [[ $B_EXTRA_DATA == 'true' && -n $proc_cdrom ]];then
|
||||||
cpuinfo_string=$( gawk -v diskId=$disk '
|
cpuinfo_string=$( gawk -v diskId=$disk '
|
||||||
|
|
Loading…
Reference in a new issue