Merge "Generic RPM installation detection"
This commit is contained in:
12
functions.sh
12
functions.sh
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user