1
0
mirror of synced 2025-01-30 20:11:45 +03:00

Bug fix for RHEL 6/7

- Fix compatibility with Red Hat Enterprise Linux (RHEL) 6 and 7
- Ref: #273
This commit is contained in:
hwdsl2 2017-11-20 00:33:36 -06:00
parent d472c65f8c
commit 3f39255f84
2 changed files with 16 additions and 9 deletions

View File

@ -115,18 +115,22 @@ cd /opt/src || exiterr "Cannot enter /opt/src."
yum -y install wget || exiterr2
# Add the EPEL repository
yum -y install epel-release || exiterr2
epel_url="https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E '%{rhel}').noarch.rpm"
yum -y install epel-release || yum -y install "$epel_url" || exiterr2
# Install necessary packages
yum -y install nss-devel nspr-devel pkgconfig pam-devel \
libcap-ng-devel libselinux-devel curl-devel \
flex bison gcc make fipscheck-devel || exiterr2
flex bison gcc make || exiterr2
OPT1='--enablerepo=*server-optional*'
OPT2='--enablerepo=*releases-optional*'
if grep -qs "release 6" /etc/redhat-release; then
yum -y remove libevent-devel
yum -y install libevent2-devel || exiterr2
yum "$OPT1" "$OPT2" -y install libevent2-devel fipscheck-devel || exiterr2
else
yum -y install libevent-devel systemd-devel || exiterr2
yum -y install systemd-devel || exiterr2
yum "$OPT1" "$OPT2" -y install libevent-devel fipscheck-devel || exiterr2
fi
# Compile and install Libreswan

View File

@ -143,20 +143,23 @@ check_ip "$PUBLIC_IP" || exiterr "Cannot detect this server's public IP. Edit th
bigecho "Adding the EPEL repository..."
yum -y install epel-release || exiterr2
epel_url="https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E '%{rhel}').noarch.rpm"
yum -y install epel-release || yum -y install "$epel_url" || exiterr2
bigecho "Installing packages required for the VPN..."
yum -y install nss-devel nspr-devel pkgconfig pam-devel \
libcap-ng-devel libselinux-devel curl-devel \
flex bison gcc make fipscheck-devel \
ppp xl2tpd || exiterr2
flex bison gcc make ppp xl2tpd || exiterr2
OPT1='--enablerepo=*server-optional*'
OPT2='--enablerepo=*releases-optional*'
if grep -qs "release 6" /etc/redhat-release; then
yum -y remove libevent-devel
yum -y install libevent2-devel || exiterr2
yum "$OPT1" "$OPT2" -y install libevent2-devel fipscheck-devel || exiterr2
else
yum -y install libevent-devel systemd-devel iptables-services || exiterr2
yum -y install systemd-devel iptables-services || exiterr2
yum "$OPT1" "$OPT2" -y install libevent-devel fipscheck-devel || exiterr2
fi
bigecho "Installing Fail2Ban to protect SSH..."