mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fixed oversight, forgot to put no cd drive detected if all cd / optical drive data is n ull
This commit is contained in:
parent
93a7e248d9
commit
982f9a3e57
14
inxi
14
inxi
|
@ -1,8 +1,8 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 1.7.18
|
||||
#### Date: July 20 2011
|
||||
#### version: 1.7.19
|
||||
#### Date: July 22 2011
|
||||
#### Patch Number: 00
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -7097,7 +7097,7 @@ print_optical_drive_data()
|
|||
eval $LOGFS
|
||||
local a_drives='' drive_data='' counter=''
|
||||
local drive_id='' drive_links='' vendor='' speed='' multisession='' mcn='' audio=''
|
||||
local dvd='' state='' rw_support='' rev='' separator=''
|
||||
local dvd='' state='' rw_support='' rev='' separator='' drive_string=''
|
||||
get_optical_drive_data
|
||||
# 0 - true dev path, ie, sr0, hdc
|
||||
# 1 - dev links to true path
|
||||
|
@ -7123,7 +7123,9 @@ print_optical_drive_data()
|
|||
speed=''
|
||||
state=''
|
||||
vendor=''
|
||||
|
||||
if [[ ${#A_OPTICAL_DRIVE_DATA[@]} -eq 1 && -z ${a_drives[0]} && -z ${a_drives[1]} ]];then
|
||||
drive_string="No optical drive detected."
|
||||
else
|
||||
if [[ ${#A_OPTICAL_DRIVE_DATA[@]} -gt 1 ]];then
|
||||
counter="-$(( i + 1 ))"
|
||||
fi
|
||||
|
@ -7157,7 +7159,9 @@ print_optical_drive_data()
|
|||
fi
|
||||
rev=" ${C1}rev$SEP3${C2} $rev"
|
||||
fi
|
||||
drive_data="${C1}Optical${counter}:${C2} $drive_id ${C1}model$SEP3${C2} $vendor$rev ${C1}dev-links$SEP3${C2} $drive_links"
|
||||
drive_string="$drive_id ${C1}model$SEP3${C2} $vendor$rev ${C1}dev-links$SEP3${C2} $drive_links"
|
||||
fi
|
||||
drive_data="${C1}Optical${counter}:${C2} $drive_string"
|
||||
drive_data=$( create_print_line "$Line_Starter" "$drive_data" )
|
||||
print_screen_output "$drive_data"
|
||||
Line_Starter=' '
|
||||
|
|
Loading…
Reference in a new issue