kpatch-build: add Oracle Linux 7 and CentOS 7 support

This commit is contained in:
Terry Wang 2014-08-19 17:38:47 +10:00
parent 7b82b59a68
commit 9fcd8ba732

View File

@ -266,7 +266,7 @@ find_dirs || die "can't find supporting tools"
source /etc/os-release
DISTRO=$ID
if [[ $DISTRO = fedora ]] || [[ $DISTRO = rhel ]]; then
if [[ $DISTRO = fedora ]] || [[ $DISTRO = rhel ]] || [[ $DISTRO = ol ]] || [[ $DISTRO = centos ]]; then
[[ -z $VMLINUX ]] && VMLINUX=/usr/lib/debug/lib/modules/$ARCHVERSION/vmlinux
[[ -e "$VMLINUX" ]] || die "kernel-debuginfo-$ARCHVERSION not installed"
@ -305,7 +305,7 @@ elif [[ -e "$SRCDIR" ]] && [[ -e "$VERSIONFILE" ]] && [[ $(cat "$VERSIONFILE") =
echo "Using cache at $SRCDIR"
else
if [[ $DISTRO = fedora ]] || [[ $DISTRO = rhel ]]; then
if [[ $DISTRO = fedora ]] || [[ $DISTRO = rhel ]] || [[ $DISTRO = ol ]] || [[ $DISTRO = centos ]]; then
echo "Fedora/Red Hat distribution detected"
rpm -q --quiet rpmdevtools || die "rpmdevtools not installed"