mirror of
https://github.com/QSCTech/zjunet.git
synced 2026-01-22 19:54: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
|
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" \
|
||||||
|
"/var/run/pppdppp-${LAC_NAME}.pid" \
|
||||||
|
"/var/run/pppd/ppp-${LAC_NAME}.pid"; do
|
||||||
if [ -e $pid ]; then
|
if [ -e $pid ]; then
|
||||||
ppp=$(cat $pid | grep ppp)
|
ppp=$(cat $pid | grep ppp)
|
||||||
if ip addr show | grep "inet.*${ppp}" > /dev/null; then
|
if ip addr show | grep "inet.*${ppp}" > /dev/null; then
|
||||||
ip addr show | grep "inet.*${ppp}" | sed 's/^ */[VPN] /'
|
ip addr show | grep "inet.*${ppp}" | sed 's/^ */[VPN] /'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user