1
0
mirror of https://github.com/QSCTech/zjunet.git synced 2026-01-22 03:34:48 +08:00

Add compatibility for ppp version 2.5.0 (#89)

Co-authored-by: long <gmchenlong@gmail.com>
This commit is contained in:
Long0x0 2023-10-08 01:27:06 +08:00 committed by GitHub
parent 3316d0fa01
commit 51ae7a6ceb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,14 +143,18 @@ xl2tpd_waituser() {
fi fi
echo -n > $PPP_LOG_FILE echo -n > $PPP_LOG_FILE
pid="/var/run/ppp-${LAC_NAME}.pid" for pid in "/var/run/ppp-${LAC_NAME}.pid" \
if [ -e $pid ]; then "/var/run/pppdppp-${LAC_NAME}.pid" \
ppp=$(cat $pid | grep ppp) "/var/run/pppd/ppp-${LAC_NAME}.pid"; do
if ip addr show | grep "inet.*${ppp}" > /dev/null; then if [ -e $pid ]; then
ip addr show | grep "inet.*${ppp}" | sed 's/^ */[VPN] /' ppp=$(cat $pid | grep ppp)
return if ip addr show | grep "inet.*${ppp}" > /dev/null; then
ip addr show | grep "inet.*${ppp}" | sed 's/^ */[VPN] /'
return
fi
break
fi fi
fi done
done done