From 7ddd20911b3544c55d822f898e93c8469e34ff04 Mon Sep 17 00:00:00 2001 From: Nyr Date: Sat, 18 Jul 2020 18:50:59 +0200 Subject: [PATCH] Bugfix -N is an illegal option for read in sh, so check if the user is using sh first. --- openvpn-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 1a580d3..2c22d78 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -5,15 +5,15 @@ # Copyright (c) 2013 Nyr. Released under the MIT License. -# Discard stdin. Needed when running from an one-liner which includes a newline -read -N 999999 -t 0.001 - # Detect Debian users running the script with "sh" instead of bash if readlink /proc/$$/exe | grep -q "dash"; then echo 'This installer needs to be run with "bash", not "sh".' exit fi +# Discard stdin. Needed when running from an one-liner which includes a newline +read -N 999999 -t 0.001 + # Detect OpenVZ 6 if [[ $(uname -r | cut -d "." -f 1) -eq 2 ]]; then echo "The system is running an old kernel, which is incompatible with this installer."