From 7f3b94308d3521d685c635194b86efcc412a49e5 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Sun, 17 Jan 2016 20:17:18 -0600 Subject: [PATCH] Small improvement to OS detection --- vpnsetup.sh | 2 +- vpnupgrade_Libreswan.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vpnsetup.sh b/vpnsetup.sh index 749d856..e3db449 100644 --- a/vpnsetup.sh +++ b/vpnsetup.sh @@ -33,7 +33,7 @@ VPN_PASSWORD=your_very_secure_password # IMPORTANT: Be sure to read important notes at the URL below: # https://github.com/hwdsl2/setup-ipsec-vpn#important-notes -if [ "$(lsb_release -si)" != "Ubuntu" ] && [ "$(lsb_release -si)" != "Debian" ]; then +if [ "$(lsb_release -si 2>/dev/null)" != "Ubuntu" ] && [ "$(lsb_release -si 2>/dev/null)" != "Debian" ]; then echo "Looks like you aren't running this script on a Ubuntu or Debian system." exit 1 fi diff --git a/vpnupgrade_Libreswan.sh b/vpnupgrade_Libreswan.sh index 8032b61..783d16f 100644 --- a/vpnupgrade_Libreswan.sh +++ b/vpnupgrade_Libreswan.sh @@ -13,7 +13,7 @@ # Check https://libreswan.org and update version number if necessary SWAN_VER=3.16 -if [ "$(lsb_release -si)" != "Ubuntu" ] && [ "$(lsb_release -si)" != "Debian" ]; then +if [ "$(lsb_release -si 2>/dev/null)" != "Ubuntu" ] && [ "$(lsb_release -si 2>/dev/null)" != "Debian" ]; then echo "Looks like you aren't running this script on a Ubuntu or Debian system." exit 1 fi