diff --git a/extras/vpnupgrade.sh b/extras/vpnupgrade.sh index 3387012..e3f355e 100644 --- a/extras/vpnupgrade.sh +++ b/extras/vpnupgrade.sh @@ -44,7 +44,7 @@ if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan"; then exiterr "This script requires Libreswan already installed." fi -if /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "$swan_ver"; then +if /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs -F "$swan_ver"; then echo "You already have Libreswan version $swan_ver installed! " echo "If you continue, the same version will be re-installed." echo @@ -149,7 +149,7 @@ make -s programs && make -s install # Verify the install and clean up cd /opt/src || exiterr "Cannot enter /opt/src." /bin/rm -rf "/opt/src/libreswan-$swan_ver" -if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "$swan_ver"; then +if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs -F "$swan_ver"; then exiterr "Libreswan $swan_ver failed to build." fi diff --git a/extras/vpnupgrade_centos.sh b/extras/vpnupgrade_centos.sh index 4590dc3..f5d79bc 100644 --- a/extras/vpnupgrade_centos.sh +++ b/extras/vpnupgrade_centos.sh @@ -40,7 +40,7 @@ if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "Libreswan"; then exiterr "This script requires Libreswan already installed." fi -if /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "$swan_ver"; then +if /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs -F "$swan_ver"; then echo "You already have Libreswan version $swan_ver installed! " echo "If you continue, the same version will be re-installed." echo @@ -141,7 +141,7 @@ make -s programs && make -s install # Verify the install and clean up cd /opt/src || exiterr "Cannot enter /opt/src." /bin/rm -rf "/opt/src/libreswan-$swan_ver" -if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "$swan_ver"; then +if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs -F "$swan_ver"; then exiterr "Libreswan $swan_ver failed to build." fi diff --git a/vpnsetup.sh b/vpnsetup.sh index 2f3c111..8d46ad5 100755 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -189,7 +189,7 @@ make -s programs && make -s install # Verify the install and clean up cd /opt/src || exiterr "Cannot enter /opt/src." /bin/rm -rf "/opt/src/libreswan-$swan_ver" -if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "$swan_ver"; then +if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs -F "$swan_ver"; then exiterr "Libreswan $swan_ver failed to build." fi diff --git a/vpnsetup_centos.sh b/vpnsetup_centos.sh index 80b83aa..f00c453 100755 --- a/vpnsetup_centos.sh +++ b/vpnsetup_centos.sh @@ -176,7 +176,7 @@ make -s programs && make -s install # Verify the install and clean up cd /opt/src || exiterr "Cannot enter /opt/src." /bin/rm -rf "/opt/src/libreswan-$swan_ver" -if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs "$swan_ver"; then +if ! /usr/local/sbin/ipsec --version 2>/dev/null | grep -qs -F "$swan_ver"; then exiterr "Libreswan $swan_ver failed to build." fi