Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
-N is an illegal option for read in sh, so check if the user is using sh first.
  • Loading branch information
Nyr committed Jul 18, 2020
1 parent 3ba1308 commit 7ddd209
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openvpn-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit 7ddd209

Please sign in to comment.