1
0
mirror of synced 2024-11-25 14:26:09 +03:00

Improve /dev/ppp check

- Show a warning instead of exiting with an error for missing /dev/ppp,
  which could happen on Debian 11/10 with certain Linux kernels. Users
  can use the IKEv2 or IPsec/XAuth ("Cisco IPsec") mode to connect.
  Ref: https://git.io/vpndebian10
This commit is contained in:
hwdsl2 2021-09-17 23:47:09 -05:00
parent ef8f60d013
commit 819c537b5e
3 changed files with 8 additions and 10 deletions

View File

@ -82,9 +82,6 @@ check_os() {
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
fi
if { [ "$os_ver" = "10" ] || [ "$os_ver" = "11" ]; } && [ ! -e /dev/ppp ]; then
exiterr "/dev/ppp is missing. Debian 11 or 10 users, see: https://git.io/vpndebian10"
fi
fi
fi
}

View File

@ -104,9 +104,6 @@ check_os() {
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
fi
if { [ "$os_ver" = "10" ] || [ "$os_ver" = "11" ]; } && [ ! -e /dev/ppp ]; then
exiterr "/dev/ppp is missing. Debian 11 or 10 users, see: https://git.io/vpndebian10"
fi
fi
fi
}

View File

@ -77,14 +77,10 @@ check_os() {
exiterr "This script only supports Ubuntu and Debian."
;;
esac
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
fi
if { [ "$os_ver" = "10" ] || [ "$os_ver" = "11" ]; } && [ ! -e /dev/ppp ]; then
exiterr "/dev/ppp is missing. Debian 11 or 10 users, see: https://git.io/vpndebian10"
fi
}
check_iface() {
@ -588,6 +584,14 @@ IKEv2 guide: https://git.io/ikev2
================================================
EOF
if [ ! -e /dev/ppp ]; then
cat <<'EOF'
Warning: /dev/ppp is missing, and IPsec/L2TP mode may not work. Please use
IKEv2 (https://git.io/ikev2) or IPsec/XAuth ("Cisco IPsec") mode
to connect. Debian 11/10 users, see https://git.io/vpndebian10.
EOF
fi
}
check_swan_ver() {