mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 00:47:47 +00:00
fixing breakage, again
This commit is contained in:
parent
3c0a999b13
commit
32df5a597f
19
inxi
19
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.8.11.b2.4
|
#### version: 0.8.11.b2.5
|
||||||
#### Date: December 16 2008
|
#### Date: December 16 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
#### inxi is a fork of infobash 3.02, the original bash sys info script by locsmif
|
||||||
|
@ -227,11 +227,10 @@ CN=''
|
||||||
### Distro Data
|
### Distro Data
|
||||||
# In cases of derived distros where the version file of the base distro can also be found under /etc,
|
# In cases of derived distros where the version file of the base distro can also be found under /etc,
|
||||||
# the derived distro's version file should go first. (Such as with Sabayon / Gentoo)
|
# the derived distro's version file should go first. (Such as with Sabayon / Gentoo)
|
||||||
DISTROS_DERIVED="antix-version kanotix-version knoppix-version sabayon-release sidux-version turbolinux-release zenwalk-version"
|
DISTROS_DERIVED="antix-version kanotix-version knoppix-version redhat-release sabayon-release sidux-version turbolinux-release zenwalk-version"
|
||||||
# debian_version excluded from DISTROS_PRIMARY so Debian can fall through to /etc/issue detection. Same goes for Ubuntu.
|
# debian_version excluded from DISTROS_PRIMARY so Debian can fall through to /etc/issue detection. Same goes for Ubuntu.
|
||||||
DISTROS_EXCLUDE_LIST="debian_version ubuntu_version"
|
DISTROS_EXCLUDE_LIST="debian_version ubuntu_version"
|
||||||
DISTROS_PRIMARY="gentoo-release redhat-release slackware-version SuSE-release mandrake-release mandriva-release"
|
DISTROS_PRIMARY="gentoo-release mandrake-release redhat-release slackware-version SuSE-release"
|
||||||
DISTROS_LSB_GOOD="mandriva-release mandrake-release mandrakelinux-release"
|
|
||||||
|
|
||||||
### Bans Data
|
### Bans Data
|
||||||
# Precede a banword with $'\2' to prevent it from being subject to automated escaping by the make_ban_lists routine
|
# Precede a banword with $'\2' to prevent it from being subject to automated escaping by the make_ban_lists routine
|
||||||
|
@ -1292,12 +1291,10 @@ get_cpu_data()
|
||||||
}
|
}
|
||||||
|
|
||||||
# for more on distro id, please reference this python thread: http://bugs.python.org/issue1322
|
# for more on distro id, please reference this python thread: http://bugs.python.org/issue1322
|
||||||
## hopefully a lsb compliant list will fix this
|
|
||||||
## lsb-release usage isn't reliable at this time
|
|
||||||
## return distro name/id if found
|
## return distro name/id if found
|
||||||
get_distro_data()
|
get_distro_data()
|
||||||
{
|
{
|
||||||
local i='' j='' distro='' distro_file='' a_distro_glob=''
|
local i='' distro='' distro_file='' a_distro_glob=''
|
||||||
|
|
||||||
# get the wild carded array of release/version /etc files if present
|
# get the wild carded array of release/version /etc files if present
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
@ -1321,14 +1318,14 @@ get_distro_data()
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
#########################################################################################################################################
|
|
||||||
# first test for the legacy antiX distro id file
|
# first test for the legacy antiX distro id file
|
||||||
if [[ -e /etc/antiX ]];then
|
if [[ -e /etc/antiX ]];then
|
||||||
distro="$( egrep -oi 'antix.*\.iso' <<< $( remove_erroneous_chars '/etc/antiX' ) | sed 's/\.iso//' )"
|
distro="$( egrep -oi 'antix.*\.iso' <<< $( remove_erroneous_chars '/etc/antiX' ) | sed 's/\.iso//' )"
|
||||||
# this handles case where only one release/version file was found, and it's lsb-release. This would
|
# this handles case where only one release/version file was found, and it's lsb-release. This would
|
||||||
# never apply for ubuntu or debian, which will filter down to the following conditions. In general
|
# never apply for ubuntu or debian, which will filter down to the following conditions. In general
|
||||||
# if there's a specific distro release file available, that's to be preferred, but this is a good backup.
|
# if there's a specific distro release file available, that's to be preferred, but this is a good backup.
|
||||||
elif [[ $distro = '' ]];then ## now check for the known good lsb-release distro's
|
elif elif [[ $distro = '' ]];then
|
||||||
if [[ ($distro_file == 'lsb-release') || -f /etc/lsb-release ]];then
|
if [[ ($distro_file == 'lsb-release') || -f /etc/lsb-release ]];then
|
||||||
for j in $DISTROS_LSB_GOOD
|
for j in $DISTROS_LSB_GOOD
|
||||||
do
|
do
|
||||||
|
@ -1360,6 +1357,8 @@ get_distro_data()
|
||||||
if [[ ${#distro} -gt 80 && $B_HANDLE_CORRUPT_DATA != 'true' ]];then
|
if [[ ${#distro} -gt 80 && $B_HANDLE_CORRUPT_DATA != 'true' ]];then
|
||||||
distro="${RED}/etc/${distro_file} corrupted, use -% to override${NORMAL}"
|
distro="${RED}/etc/${distro_file} corrupted, use -% to override${NORMAL}"
|
||||||
fi
|
fi
|
||||||
|
## note: would like to actually understand the method even if it's not used
|
||||||
|
# : ${distro:=Unknown distro o_O}
|
||||||
## test for /etc/lsb-release as a backup in case of failure, in cases where > one version/release file
|
## test for /etc/lsb-release as a backup in case of failure, in cases where > one version/release file
|
||||||
## were found but the above resulted in null distro value
|
## were found but the above resulted in null distro value
|
||||||
if [[ -z $distro && -f /etc/lsb-release ]];then
|
if [[ -z $distro && -f /etc/lsb-release ]];then
|
||||||
|
@ -2245,7 +2244,7 @@ print_audio_data()
|
||||||
if [[ -n ${a_audio_working[0]} ]];then
|
if [[ -n ${a_audio_working[0]} ]];then
|
||||||
audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
audio_data="${C1}Card-$(( $i + 1 )) ${C2}${a_audio_working[0]}$alsa_driver$port_data"
|
||||||
fi
|
fi
|
||||||
if [[ -n $audio_data ]];then ## now check for the known good lsb-release distro's
|
if [[ -n $audio_data ]];then
|
||||||
audio_data=$( create_print_line " " "$audio_data" )
|
audio_data=$( create_print_line " " "$audio_data" )
|
||||||
print_screen_output "$audio_data"
|
print_screen_output "$audio_data"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue