adjusted the missing mdstat file method to be right.

This commit is contained in:
inxi-svn 2012-05-11 06:23:52 +00:00
parent f744c6ffbe
commit 9837f9cbec

32
inxi
View file

@ -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