From 9837f9cbec00e8353793a873e5e756c5f17bb05d Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 11 May 2012 06:23:52 +0000 Subject: [PATCH] adjusted the missing mdstat file method to be right. --- inxi | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/inxi b/inxi index de3a1c2..a0ac2ca 100755 --- a/inxi +++ b/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