From cfa634c6bc19d6949e81b46c36bb68c10f160744 Mon Sep 17 00:00:00 2001 From: "trash80.v2.0" Date: Sun, 21 Dec 2008 04:45:31 +0000 Subject: [PATCH] reconfigured lsb lookup, h2's fix --- inxi | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/inxi b/inxi index 372fa01..99d73d5 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.8.12 +#### version: 0.8.13 #### Date: December 16 2008 ######################################################################## #### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif @@ -1314,18 +1314,15 @@ get_distro_data() # This is a known bug, search for the word "strange" inside comments # echo "i='$i' a_distro_glob[@]='${a_distro_glob[@]}'" if [[ " ${a_distro_glob[@]} " == *" $i "* ]];then - distro_file="${i}" - break - fi - done - # Now lets see if the distro file is in the known-good working-lsb-list - # if so, use lsb-release - # this is for only those distro's with self named release/version files - # because Mint does not use such, it must be done as below - for j in $DISTROS_LSB_GOOD - do - if [[ " ${distro_file} " == *" $j "* ]];then - distro_file='lsb-release' + # Now lets see if the distro file is in the known-good working-lsb-list + # if so, use lsb-release, if not, then just use the found file + # this is for only those distro's with self named release/version files + # because Mint does not use such, it must be done as below + if [[ " $DISTROS_LSB_GOOD " == *" ${i} "* && -f /etc/lsb-release ]];then + distro_file='lsb-release' + else + distro_file="${i}" + fi break fi done