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:
parent
3316d0fa01
commit
51ae7a6ceb
@ -143,14 +143,18 @@ xl2tpd_waituser() {
|
||||
fi
|
||||
echo -n > $PPP_LOG_FILE
|
||||
|
||||
pid="/var/run/ppp-${LAC_NAME}.pid"
|
||||
if [ -e $pid ]; then
|
||||
ppp=$(cat $pid | grep ppp)
|
||||
if ip addr show | grep "inet.*${ppp}" > /dev/null; then
|
||||
ip addr show | grep "inet.*${ppp}" | sed 's/^ */[VPN] /'
|
||||
return
|
||||
for pid in "/var/run/ppp-${LAC_NAME}.pid" \
|
||||
"/var/run/pppdppp-${LAC_NAME}.pid" \
|
||||
"/var/run/pppd/ppp-${LAC_NAME}.pid"; do
|
||||
if [ -e $pid ]; then
|
||||
ppp=$(cat $pid | grep ppp)
|
||||
if ip addr show | grep "inet.*${ppp}" > /dev/null; then
|
||||
ip addr show | grep "inet.*${ppp}" | sed 's/^ */[VPN] /'
|
||||
return
|
||||
fi
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
done
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user