From 4305cd22d131fd675a5401422472cef0a5ec0544 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 7 Feb 2009 08:09:00 +0000 Subject: [PATCH] (change version) bug fix, now it should work for all uuid/label --- inxi | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/inxi b/inxi index 1c9a48b..cc5b0a5 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.10.3 +#### version: 0.10.4 #### Date: 6 February 2009 ######################################################################## #### SPECIAL THANKS @@ -2446,8 +2446,8 @@ get_partition_data_advanced() # dev item set no matter what, so then we can get the rest of any missing data # first we'll get the dev_item if it's missing if [[ -n $dev_disk_uuid ]] && [[ -z $dev_item && -n $dev_uuid ]];then - dev_item=$( echo "$dev_disk_label" | gawk ' - /'$dev_label'/ { + dev_item=$( echo "$dev_disk_uuid" | gawk ' + /'$dev_uuid'/ { item=gensub( /..\/..\/(.+)/, "\\1", 1, $NF ) print item }' ) @@ -2458,7 +2458,6 @@ get_partition_data_advanced() print item }' ) fi - if [[ -n $dev_disk_uuid ]] && [[ -n $dev_item && -z $dev_uuid ]];then dev_uuid=$( echo "$dev_disk_uuid" | gawk ' /'$dev_item'$/ { @@ -2468,11 +2467,10 @@ get_partition_data_advanced() if [[ -n $dev_disk_label ]] && [[ -n $dev_item && -z $dev_label ]];then dev_label=$( echo "$dev_disk_label" | gawk ' /'$dev_item'/ { - item=gensub( /..\/..\/(.+)/, "\\1", 1, $NF ) - print item + print $(NF - 2) }' ) - fi + fi # assemble everything we could get for dev/h/dx, label, and uuid IFS="," A_PARTITION_DATA[i]=${a_partition_working[0]}","${a_partition_working[1]}","${a_partition_working[2]}","${a_partition_working[3]}","${a_partition_working[4]}","$dev_item","$dev_label","$dev_uuid