parent
328e78e9a0
commit
c8db38f12b
@ -33,6 +33,17 @@ check_vz() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_lxc() {
|
||||
# shellcheck disable=SC2154
|
||||
if [ "$container" = "lxc" ] && [ ! -e /dev/ppp ]; then
|
||||
cat >&2 <<'EOF'
|
||||
Error: /dev/ppp is missing. LXC containers require configuration.
|
||||
See: https://github.com/hwdsl2/setup-ipsec-vpn/issues/1014
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_os() {
|
||||
os_type=centos
|
||||
rh_file="/etc/redhat-release"
|
||||
@ -201,6 +212,7 @@ run_setup() {
|
||||
quickstart() {
|
||||
check_root
|
||||
check_vz
|
||||
check_lxc
|
||||
check_os
|
||||
check_iface
|
||||
check_iptables
|
||||
|
12
vpnsetup.sh
12
vpnsetup.sh
@ -55,6 +55,17 @@ check_vz() {
|
||||
fi
|
||||
}
|
||||
|
||||
check_lxc() {
|
||||
# shellcheck disable=SC2154
|
||||
if [ "$container" = "lxc" ] && [ ! -e /dev/ppp ]; then
|
||||
cat >&2 <<'EOF'
|
||||
Error: /dev/ppp is missing. LXC containers require configuration.
|
||||
See: https://github.com/hwdsl2/setup-ipsec-vpn/issues/1014
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
check_os() {
|
||||
os_type=centos
|
||||
rh_file="/etc/redhat-release"
|
||||
@ -252,6 +263,7 @@ run_setup() {
|
||||
vpnsetup() {
|
||||
check_root
|
||||
check_vz
|
||||
check_lxc
|
||||
check_os
|
||||
check_iface
|
||||
check_creds
|
||||
|
Loading…
Reference in New Issue
Block a user