From a88801cbf035866d9cdb25929cc19e811aa1b5b9 Mon Sep 17 00:00:00 2001 From: Teddysun Date: Sun, 5 Jun 2016 20:17:44 +0900 Subject: [PATCH] Add warning information when install based on OpenVZ --- l2tp.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/l2tp.sh b/l2tp.sh index 2d1ed29..a5e8afa 100644 --- a/l2tp.sh +++ b/l2tp.sh @@ -199,6 +199,19 @@ version_check(){ preinstall_l2tp(){ + echo + if [ -d "/proc/vz" ]; then + echo -e "\033[41;37m WARNING: \033[0m Your VPS is based OpenVZ, Maybe the kernel does not support IPSec." + echo "Continue to install it? (y/n)" + read -p "(Default: n)" agree + [ -z ${agree} ] && agree="n" + if [ "${agree}" == "n" ]; then + echo + echo "L2TP install cancelled, nothing to do..." + echo + exit 0 + fi + fi echo echo "Please input IP-Range:" read -p "(Default Range: 192.168.18):" iprange