mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
adjusted the missing mdstat file method to be right.
This commit is contained in:
parent
f744c6ffbe
commit
9837f9cbec
32
inxi
32
inxi
|
@ -7998,22 +7998,24 @@ print_raid_data()
|
|||
if [[ $B_SHOW_BASIC_RAID == 'true' && $basic_raid != '' ]];then
|
||||
a_raid_data[0]="${C1}Device$basic_raid_plural${SEP3}${C2} $basic_raid"
|
||||
fi
|
||||
if [[ ${a_raid_data[0]} == '' ]];then
|
||||
if [[ $B_MDSTAT_FILE == 'true' ]];then
|
||||
|
||||
|
||||
if [[ $B_MDSTAT_FILE != 'true' ]];then
|
||||
a_raid_data[0]="${C1}No /proc/mdstat file detected!${C2} "
|
||||
else
|
||||
if [[ ${a_raid_data[0]} == '' ]];then
|
||||
a_raid_data[0]="${C1}Device${SEP3}${C2} No RAID devices detected"
|
||||
# now let's add on the system line and the unused device line. Only print on -xx
|
||||
if [[ $kernel_support$read_ahead$raid_event != '' ]];then
|
||||
array_count=${#a_raid_data[@]}
|
||||
a_raid_data[array_count]="${C1}System${SEP3}${C2}$kernel_support$read_ahead$raid_event"
|
||||
loop_limit=1
|
||||
fi
|
||||
if [[ $unused_devices != '' ]];then
|
||||
array_count_unused=${#a_raid_data[@]}
|
||||
a_raid_data[array_count_unused]="$unused_devices"
|
||||
loop_limit=2
|
||||
fi
|
||||
else
|
||||
a_raid_data[0]="${C1}No /proc/mdstat file detected!${C2} "
|
||||
fi
|
||||
# now let's add on the system line and the unused device line. Only print on -xx
|
||||
if [[ $kernel_support$read_ahead$raid_event != '' ]];then
|
||||
array_count=${#a_raid_data[@]}
|
||||
a_raid_data[array_count]="${C1}System${SEP3}${C2}$kernel_support$read_ahead$raid_event"
|
||||
loop_limit=1
|
||||
fi
|
||||
if [[ $unused_devices != '' ]];then
|
||||
array_count_unused=${#a_raid_data[@]}
|
||||
a_raid_data[array_count_unused]="$unused_devices"
|
||||
loop_limit=2
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue