From 4f198ab994e0071afeab0ec2741f3137debec200 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Tue, 12 Jan 2016 23:05:16 -0600 Subject: [PATCH] Use full path for ipsec command --- vpnupgrade_Libreswan.sh | 6 +++--- vpnupgrade_Libreswan_centos.sh | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vpnupgrade_Libreswan.sh b/vpnupgrade_Libreswan.sh index 512fa30..e449c52 100644 --- a/vpnupgrade_Libreswan.sh +++ b/vpnupgrade_Libreswan.sh @@ -28,7 +28,7 @@ if [ "$(id -u)" != 0 ]; then exit 1 fi -ipsec --version 2>/dev/null | grep -qs "Libreswan" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan" if [ "$?" != "0" ]; then echo "This upgrade script requires that you already have Libreswan installed." echo "Aborting." @@ -37,7 +37,7 @@ fi clear -ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" if [ "$?" = "0" ]; then echo "You already have Libreswan ${SWAN_VER} installed! " echo @@ -100,7 +100,7 @@ tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE" cd "libreswan-${SWAN_VER}" || { echo "Failed to enter Libreswan source directory. Aborting."; exit 1; } make programs && make install -ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" if [ "$?" != "0" ]; then echo echo "Sorry, something went wrong." diff --git a/vpnupgrade_Libreswan_centos.sh b/vpnupgrade_Libreswan_centos.sh index 0d7225c..7b9af58 100644 --- a/vpnupgrade_Libreswan_centos.sh +++ b/vpnupgrade_Libreswan_centos.sh @@ -33,7 +33,7 @@ if [ "$(id -u)" != 0 ]; then exit 1 fi -ipsec --version 2>/dev/null | grep -qs "Libreswan" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan" if [ "$?" != "0" ]; then echo "This upgrade script requires that you already have Libreswan installed." echo "Aborting." @@ -42,7 +42,7 @@ fi clear -ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan ${SWAN_VER}" if [ "$?" = "0" ]; then echo "You already have Libreswan ${SWAN_VER} installed! " echo @@ -130,7 +130,7 @@ tar xvzf "$SWAN_FILE" && rm -f "$SWAN_FILE" cd "libreswan-${SWAN_VER}" || { echo "Failed to enter Libreswan source directory. Aborting."; exit 1; } make programs && make install -ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" +/usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "${SWAN_VER}" if [ "$?" != "0" ]; then echo echo "Sorry, something went wrong."