branch one, testing cleaner yum repo enabled status

This commit is contained in:
inxi-svn 2012-12-22 03:05:48 +00:00
parent e2d3f3e52d
commit ab8c8b6ed0

8
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi
#### version: 1.8.24
#### Date: December 6 2012
#### Patch Number: 02-b1
#### Patch Number: 03-b1
########################################################################
#### SPECIAL THANKS
########################################################################
@ -6021,7 +6021,8 @@ get_repo_data()
local pacman_conf='/etc/pacman.conf' pacman_repo_dir='/etc/pacman.d/' pisi_dir='/etc/pisi/'
## note: a fringe case was discovered where repo files were in /etc/apt/sources.list.d for yum
# so handling more explicitly the actual repo file id
# so handling more explicitly the actual repo file id. Note that apt-get can be run in rpm distros
# using apt-rpm package
if [[ -n $( type -p apt-get ) ]];then
repo_type='apt'
elif [[ -n $( type -p yum ) ]];then
@ -6073,7 +6074,8 @@ get_repo_data()
sub( /(mirrorlist|baseurl)[[:space:]]*=[[:space:]]*/, "", $1 ) # strip out the field starter
urlData = $1
}
/^enabled=/ {
# note: either it is simple enabled, or it is enabled = 1. enabled = 0 means disabled
/^enabled=/ && !/^enabled[[:space:]]*=[[:space:]]*0/ {
enabledStatus = $1
}
# print out the line if all 3 values are found, otherwise if a new