mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
branch one, testing cleaner yum repo enabled status
This commit is contained in:
parent
e2d3f3e52d
commit
ab8c8b6ed0
8
inxi
8
inxi
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue