Merge "Generic RPM installation detection"

This commit is contained in:
Jenkins
2015-09-24 13:49:12 +00:00
committed by Gerrit Code Review

View File

@@ -20,9 +20,15 @@ SUDO="sudo"
# Distro check functions
function is_fedora {
# note we consider CentOS 7 as fedora for now
lsb_release -i 2>/dev/null | grep -iq "fedora" || \
lsb_release -i 2>/dev/null | grep -iq "CentOS"
# note this is a little mis-named, we consider basically anything
# using RPM as "is_fedora". This includes centos7, fedora &
# related distros like CloudOS and OracleLinux (note, we don't
# support centos6 with this script -- we are assuming is_fedora
# implies >=centos7 features such as systemd/journal, etc).
#
# This is KISS; if we need more fine-grained differentiation we
# will handle it later.
rpm -qf /etc/*-release >&/dev/null
}
function is_ubuntu {