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:
parent
ef8f60d013
commit
819c537b5e
@ -82,9 +82,6 @@ check_os() {
|
|||||||
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
||||||
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
||||||
fi
|
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
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -104,9 +104,6 @@ check_os() {
|
|||||||
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
||||||
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
||||||
fi
|
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
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -77,14 +77,10 @@ check_os() {
|
|||||||
exiterr "This script only supports Ubuntu and Debian."
|
exiterr "This script only supports Ubuntu and Debian."
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
|
os_ver=$(sed 's/\..*//' /etc/debian_version | tr -dc 'A-Za-z0-9')
|
||||||
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
if [ "$os_ver" = "8" ] || [ "$os_ver" = "jessiesid" ]; then
|
||||||
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
exiterr "Debian 8 or Ubuntu < 16.04 is not supported."
|
||||||
fi
|
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() {
|
check_iface() {
|
||||||
@ -588,6 +584,14 @@ IKEv2 guide: https://git.io/ikev2
|
|||||||
================================================
|
================================================
|
||||||
|
|
||||||
EOF
|
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() {
|
check_swan_ver() {
|
||||||
|
Loading…
Reference in New Issue
Block a user