diff --git a/inxi b/inxi index 9f7efd0..50dcb16 100755 --- a/inxi +++ b/inxi @@ -3097,14 +3097,14 @@ get_partition_data_advanced() get_repo_data() { local repo_file='' repo_data_working='' - local apt_file='/etc/apt/sources.list' yum_repo_dir='/etc/yum.repos.d/' + local apt_file='/etc/apt/sources.list' yum_repo_dir='/etc/yum.repos.d/' yum_conf='/etc/yum.conf' if [[ -f $apt_file || -d $apt_file.d ]];then REPO_DATA="$( grep -Esv '(^[[:space:]]*$|^[[:space:]]*#)' $apt_file $apt_file.d/*.list )" REPO_FILE_ID='apt sources' - elif [[ -d $yum_repo_dir ]];then + elif [[ -d $yum_repo_dir || -f $yum_conf ]];then # older redhats put their yum data in /etc/yum.conf - for repo_file in $( ls $yum_repo_dir*.repo /etc/yum.conf 2>/dev/null ) + for repo_file in $( ls $yum_repo_dir*.repo $yum_conf 2>/dev/null ) do repo_data_working="$( gawk -v repoFile=$repo_file ' # construct the string for the print function to work with, file name: data