mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
fixed a bug
This commit is contained in:
parent
c35647a380
commit
99df6ad86c
19
inxi
19
inxi
|
@ -3,7 +3,7 @@
|
|||
#### Script Name: inxi
|
||||
#### version: 1.6.10
|
||||
#### Date: June 17 2011
|
||||
#### Patch Number: 11
|
||||
#### Patch Number: 13
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -250,6 +250,7 @@ B_SHOW_DISK_TOTAL='false'
|
|||
B_SHOW_DISK='false'
|
||||
# Show full hard disk output
|
||||
B_SHOW_FULL_HDD='false'
|
||||
B_SHOW_FULL_OPTICAL='false'
|
||||
B_SHOW_GRAPHICS='false'
|
||||
# Set this to 'false' to avoid printing the hostname, this isn't used except for
|
||||
# user configuration options via config files
|
||||
|
@ -259,7 +260,6 @@ B_SHOW_IP='false'
|
|||
B_SHOW_LABELS='false'
|
||||
B_SHOW_MACHINE='false'
|
||||
B_SHOW_NETWORK='false'
|
||||
B_SHOW_OPTICAL_DRIVES='false'
|
||||
# either -v > 3 or -P will show partitions
|
||||
B_SHOW_PARTITIONS='false'
|
||||
B_SHOW_PARTITIONS_FULL='false'
|
||||
|
@ -1797,7 +1797,7 @@ get_parameters()
|
|||
use_short='false'
|
||||
;;
|
||||
d) B_SHOW_DISK='true'
|
||||
B_SHOW_OPTICAL_DRIVES='true'
|
||||
B_SHOW_FULL_OPTICAL='true'
|
||||
use_short='false'
|
||||
# error_handler 20 "-d has been replaced by -b"
|
||||
;;
|
||||
|
@ -1911,12 +1911,13 @@ get_parameters()
|
|||
fi
|
||||
if [[ $OPTARG -ge 5 ]];then
|
||||
B_SHOW_AUDIO='true'
|
||||
B_SHOW_BASIC_OPTICAL='true'
|
||||
B_SHOW_SENSORS='true'
|
||||
B_SHOW_LABELS='true'
|
||||
B_SHOW_UUIDS='true'
|
||||
fi
|
||||
if [[ $OPTARG -ge 6 ]];then
|
||||
B_SHOW_OPTICAL_DRIVES='true'
|
||||
B_SHOW_FULL_OPTICAL='true'
|
||||
B_SHOW_PARTITIONS_FULL='true'
|
||||
B_SHOW_UNMOUNTED_PARTITIONS='true'
|
||||
fi
|
||||
|
@ -2111,7 +2112,7 @@ show_options()
|
|||
print_screen_output " 3 - Adds advanced CPU (-C), network (-n) data, and switches on -x advanced data option."
|
||||
print_screen_output " 4 - Adds partition size/filled data (-P) for (if present):/, /home, /var/, /boot"
|
||||
print_screen_output " Shows full disk data (-D)"
|
||||
print_screen_output " 5 - Adds audio card (-A); sensors (-s), partion label (-l) and UUID (-u)."
|
||||
print_screen_output " 5 - Adds audio card (-A); sensors (-s), partion label (-l) and UUID (-u), short form of optical drives."
|
||||
print_screen_output " 6 - Adds full partition data (-p), unmounted partition data (-o), optical drive data (-d)."
|
||||
print_screen_output "-x Show extra data (only works with verbose or line output, not short form): "
|
||||
print_screen_output " -C - bogomips on Cpu;"
|
||||
|
@ -4527,7 +4528,7 @@ get_optical_drive_data()
|
|||
|
||||
if [[ -n $dev_disks_real ]];then
|
||||
dev_disks_links=$( ls /dev/dvd* /dev/cd* /dev/scd* 2>/dev/null )
|
||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||
if [[ $B_SHOW_FULL_OPTICAL == 'true' ]];then
|
||||
proc_cdrom="$( cat /proc/sys/dev/cdrom/info 2>/dev/null )"
|
||||
fi
|
||||
IFS=$'\n'
|
||||
|
@ -4577,7 +4578,7 @@ get_optical_drive_data()
|
|||
)
|
||||
fi
|
||||
# this needs to run no matter if there's proc data or not to create the array comma list
|
||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||
if [[ $B_SHOW_FULL_OPTICAL == 'true' ]];then
|
||||
cpuinfo_string=$( gawk -v diskId=$disk '
|
||||
BEGIN {
|
||||
IGNORECASE=1
|
||||
|
@ -6342,7 +6343,7 @@ print_hard_disk_data()
|
|||
print_screen_output "$hdd_data"
|
||||
Line_Starter=' '
|
||||
fi
|
||||
if [[ $B_SHOW_OPTICAL_DRIVES == 'true' || $B_SHOW_BASIC_OPTICAL == 'true' ]];then
|
||||
if [[ $B_SHOW_FULL_OPTICAL == 'true' || $B_SHOW_BASIC_OPTICAL == 'true' ]];then
|
||||
print_optical_drive_data
|
||||
fi
|
||||
|
||||
|
@ -6821,7 +6822,7 @@ print_optical_drive_data()
|
|||
# 12 - dvdr
|
||||
# 13 - dvdram
|
||||
# 14 - state
|
||||
if [[ $B_SHOW_OPTICAL_DRIVES == 'true' ]];then
|
||||
if [[ $B_SHOW_FULL_OPTICAL == 'true' ]];then
|
||||
if [[ -z ${a_drives[5]} ]];then
|
||||
speed='N/A'
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue