From e814bb673a9052df31f2253d61e6abdb6bd48a0d Mon Sep 17 00:00:00 2001 From: Lin Song Date: Fri, 8 Jan 2016 09:02:15 -0600 Subject: [PATCH] Additional test for CentOS version --- vpnsetup_centos.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 95cf155..a410be4 100644 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -29,6 +29,11 @@ if [ ! -f /etc/redhat-release ]; then exit 1 fi +if grep -qs -v -e "release 6" -e "release 7" /etc/redhat-release; then + echo "Sorry, this script only supports versions 6 and 7 of CentOS/RHEL." + exit 1 +fi + if [ "$(uname -m)" != "x86_64" ]; then echo "Sorry, this script only supports 64-bit CentOS/RHEL." exit 1