trying a bug fix for devBase partition info

This commit is contained in:
inxi-svn 2009-10-14 22:53:34 +00:00
parent d3bc0d6fcb
commit c1fe45f286

9
inxi
View file

@ -2908,6 +2908,10 @@ get_partition_data()
} }
getline getline
} }
# next set devBase if it didn not get set above here
( $1 ~ /^\/dev\// ) && ( devBase == "" ) {
devBase=gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 )
}
# this handles yet another fredforfaen special case where a mounted drive # this handles yet another fredforfaen special case where a mounted drive
# has the search string in its name # has the search string in its name
$NF ~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$/ { $NF ~ /^\/$|^\/boot$|^\/var$|^\/home$|^\/tmp$|^\/usr$/ {
@ -3098,6 +3102,7 @@ get_repo_data()
{ {
local repo_file='' repo_data_working='' local repo_file='' repo_data_working=''
local apt_file='/etc/apt/sources.list' yum_repo_dir='/etc/yum.repos.d/' yum_conf='/etc/yum.conf' local apt_file='/etc/apt/sources.list' yum_repo_dir='/etc/yum.repos.d/' yum_conf='/etc/yum.conf'
local pacman_conf='/etc/pacman.conf' pacman_repo_dir='/etc/pacman.d/'
if [[ -f $apt_file || -d $apt_file.d ]];then if [[ -f $apt_file || -d $apt_file.d ]];then
REPO_DATA="$( grep -Esv '(^[[:space:]]*$|^[[:space:]]*#)' $apt_file $apt_file.d/*.list )" REPO_DATA="$( grep -Esv '(^[[:space:]]*$|^[[:space:]]*#)' $apt_file $apt_file.d/*.list )"
@ -3172,6 +3177,10 @@ $repo_data_working"
fi fi
done done
REPO_FILE_ID='yum repos' REPO_FILE_ID='yum repos'
# note that pacman/arch mirrorlist file has all the mirrors on it, so it
# won't work for this feature, the output would be largely meaningless, and far too long
# elif [[ -f $pacman_file || -d $pacman_repo_dir ]];then
# REPO_FILE_ID='yum repos'
fi fi
} }