diff options
Diffstat (limited to 'templates/connect/interface')
-rw-r--r-- | templates/connect/interface/node.def | 2 | ||||
-rw-r--r-- | templates/connect/interface/node.tag/node.def | 28 |
2 files changed, 0 insertions, 30 deletions
diff --git a/templates/connect/interface/node.def b/templates/connect/interface/node.def deleted file mode 100644 index a94a721..0000000 --- a/templates/connect/interface/node.def +++ /dev/null @@ -1,2 +0,0 @@ -help: Bring up a connection-oriented network interface - diff --git a/templates/connect/interface/node.tag/node.def b/templates/connect/interface/node.tag/node.def deleted file mode 100644 index 145e972..0000000 --- a/templates/connect/interface/node.tag/node.def +++ /dev/null @@ -1,28 +0,0 @@ -help: Bring up connection-oriented interface - -allowed: local -a array ; - array=( /etc/ppp/peers/pppoe* /etc/ppp/peers/pppoa* /etc/ppp/peers/wan* /etc/ppp/peers/wlm* ) ; - echo -n ${array[@]##*/} - -run: - IFNAME=${3} - LOGFILE=/var/log/vyatta/ppp_${IFNAME}.log - if [ ! -e /etc/ppp/peers/$IFNAME ]; then - echo "Invalid interface: $3" - elif [ -d /sys/class/net/$IFNAME ]; then - echo "Interface $IFNAME is already connected." - elif [ ! -z "`ps -C pppd -f | grep $IFNAME `" ]; then - echo "Interface ${IFNAME}: Connection is being established." - else - echo "Bringing interface $IFNAME up..." - echo "`date`: User $USER starting PPP daemon for $IFNAME by connect command" >> $LOGFILE - if [ "${IFNAME::3}" = "wan" ]; then - # Serial interfaces are started with "pon" - (umask 0; sudo /usr/sbin/pon $IFNAME > \ - /dev/null 2>&1 & ) - else - # PPPOE, PPPOA, WLM interfaces are started directly - ( umask 0; sudo setsid sh -c "nohup /usr/sbin/pppd \ - call $IFNAME > /tmp/${IFNAME}.log 2>&1 &" ) - fi - fi |