branch one, try 3

This commit is contained in:
inxi-svn 2014-03-27 20:27:53 +00:00
parent 1654dca7de
commit 0dd68f4588

31
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi #### Script Name: inxi
#### Version: 2.1.11 #### Version: 2.1.11
#### Date: 2014-03-26 #### Date: 2014-03-26
#### Patch Number: 02-b1 #### Patch Number: 03-b1
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
######################################################################## ########################################################################
@ -7719,23 +7719,20 @@ get_raid_component_data_bsd()
separator=' ' separator=' '
done done
else else
for device in ${a_raid_data[0]} component_string=$( gawk '
do BEGIN {
component_string=$( gawk ' IGNORECASE=1
BEGIN { separator=""
IGNORECASE=1 components=""
separator="" }
components="" $1 ~ /^'$device'$/ {
while ( getline && !/^$/ ) {
sub( /ONLINE/, "", $2 )
components=components $1 separator $2
separator=" "
} }
$1 ~ /^'$device'$/ { print components
while ( getline && !/^$/ { }' <<< "$zpool_status" )
sub( /ONLINE/, "", $2 )
components=components $1 separator $2
separator=" "
}
print components
}' <<< "$zpool_status" )
done
fi fi
array_string="$device,${a_raid_data[1]},${a_raid_data[2]},$component_string,${a_raid_data[4]}" array_string="$device,${a_raid_data[1]},${a_raid_data[2]},$component_string,${a_raid_data[4]}"
array_string="$array_string,${a_raid_data[5]},${a_raid_data[6]},${a_raid_data[7]},${a_raid_data[8]}" array_string="$array_string,${a_raid_data[5]},${a_raid_data[6]},${a_raid_data[7]},${a_raid_data[8]}"