From f8dd3b9b1d0c55f5c7f53453637c50543656c64f Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 17 Nov 2012 22:49:30 +0000 Subject: [PATCH] bug fix, wait for 1.8.22 until verified --- inxi | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/inxi b/inxi index b5463fa..db3d2ed 100755 --- a/inxi +++ b/inxi @@ -3,7 +3,7 @@ #### Script Name: inxi #### version: 1.8.21 #### Date: November 17 2012 -#### Patch Number: 02 +#### Patch Number: 03 ######################################################################## #### SPECIAL THANKS ######################################################################## @@ -3635,6 +3635,7 @@ get_distro_data() done fi log_function_data "distro_file: $distro_file" + distro_file='os-release' # first test for the legacy antiX distro id file if [[ -e /etc/antiX ]];then distro="$( grep -Eoi 'antix.*\.iso' <<< $( remove_erroneous_chars '/etc/antiX' ) | sed 's/\.iso//' )" @@ -3824,27 +3825,27 @@ get_lsb_os_release_data() if ( $NF != "n/a" ) { regularName = $NF } + } /^VERSION/ { gsub(/^ +| +$|\"/, "", $NF) gsub(/^ +| +$/, "", $1) - if ( $NF != "n/a" && $1 == "VERSION") { + if ( $NF != "n/a" && $1 == "VERSION" ) { versionName = $NF } - else if ( $NF != "n/a" && $1 == "VERSION_ID") { + else if ( $NF != "n/a" && $1 == "VERSION_ID" ) { versionId = $NF } } - } END { - if ( prettyName != "" ){ + if ( prettyName != "" ) { distroName = prettyName } - else if ( regularName != "" ){ + else if ( regularName != "" ) { distroName = regularName - if ( versionName != "" ){ + if ( versionName != "" ) { distroName = distroName " " versionName } - else if ( versionId != "" ){ + else if ( versionId != "" ) { distroName = distroName " " versionId }