1
0
mirror of https://github.com/Nyr/openvpn-install.git synced 2024-11-23 21:46:08 +03:00

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
parent d30e11d019
commit db0b51228b

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