mirror of
https://github.com/Nyr/openvpn-install.git
synced 2024-11-27 15:36:07 +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:
parent
d30e11d019
commit
db0b51228b
@ -57,9 +57,7 @@ This version of CentOS is too old and unsupported"
|
||||
exit
|
||||
fi
|
||||
|
||||
if [[ -e /dev/net/tun ]] && exec 2>/dev/null 7<>/dev/net/tun; then
|
||||
exec 7>&-
|
||||
else
|
||||
if [[ ! -e /dev/net/tun ]] || ! ( exec 7<>/dev/net/tun ) 2>/dev/null; then
|
||||
echo "This system does not have the TUN device available
|
||||
TUN needs to be enabled before running this installer"
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user