Red callout requires permission 755
/etc/ppp/ip-up.d/ip-up:
Once the PPP link is established, PPPD will /etc/ppp/ip-up look for the instructions if the script exists and can be executed, then the PPP servo program will execute the script, which allows you to automatically execute any special routing instructions that may be necessary and any actions you want to perform each time the PPP connection starts
#!/bin/sh# At least a number of online calls: Dialnum=$ (UCIGetsyncdial.config.dialnum) #当前虚拟端口拨号成功取得ip的数目 (excludes dialing initiated by other physical ports): Upnum=$ (IP a|grep peer|grep-v grep|grep'Pppoe-vwan'|WC-M) LOCKFILE="/tmp/ip-up.tmp"Trap'echo "rm lockfile!"; Rm-f \${lockfile}; Exit' 1 2 3 9  theif[ -F \${lockfile}]thenecho"Instance is running!"Exit0ElseTouch \${lockfile}chmod -\${lockfile}echo"Touch successeed!"Sleep -if["$upnum"-lt"$dialnum"]thenpppconnectcheckfiecho"finish!"firm-F \${lockfile}
Fix OpenWrt dial Just last problem