pppoe连接建立后,系统自动调用/etc/ppp/ip-up脚本。
其参数如下面文件所示,第4个参数是系统获得的动态ip。
#!/bin/bash
#
# Script which handles the routing issues as necessary for pppd
# Only the link to Newman requires this handling.
#
# When the ppp link comes up, this script is called with the following
# parameters
# $1 the interface name used by pppd (e.g. ppp3)
# $2 the tty device name
# $3 the tty device speed
# $4 the local IP address for the interface
# $5 the remote IP address
# $6 the parameter specified by the 'ipparam' option to pppd
#
PATH=/sbin:/usr/sbin:/bin:/usr/bin
export PATH
route add default gw $4
#下面这一行是使用3322.org的动态域名,如没有使用,可以不加。
/usr/local/bin/ez-ipupdate -c /usr/local/ezip/qdns.conf