Fix TUN device check

Fix for the mistaken stderr redirection, sorry about that. Also, run in a
subshell so we don't need to manually close the file descriptor.
This commit is contained in:
Nyr 2020-05-15 18:19:24 +02:00 committed by Aleksandar Spasojevic
parent 8013ec56a0
commit 388cfaba3a

View File

@ -57,9 +57,7 @@ This version of CentOS is too old and unsupported"
exit exit
fi fi
if [[ -e /dev/net/tun ]] && exec 2>/dev/null 7<>/dev/net/tun; then if [[ ! -e /dev/net/tun ]] || ! ( exec 7<>/dev/net/tun ) 2>/dev/null; then
exec 7>&-
else
echo "This system does not have the TUN device available echo "This system does not have the TUN device available
TUN needs to be enabled before running this installer" TUN needs to be enabled before running this installer"
exit exit