From b6c0ae3789806b0e9242385dcffc5184dd3ba5c0 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Tue, 25 Feb 2020 11:18:57 +0100 Subject: pppoe: T2070: rewrite (dis-)connect op-mode commands in XML and Python --- templates/connect/interface/node.def | 2 -- templates/connect/interface/node.tag/node.def | 28 --------------------------- templates/connect/node.def | 1 - 3 files changed, 31 deletions(-) delete mode 100644 templates/connect/interface/node.def delete mode 100644 templates/connect/interface/node.tag/node.def delete mode 100644 templates/connect/node.def (limited to 'templates/connect') 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 diff --git a/templates/connect/node.def b/templates/connect/node.def deleted file mode 100644 index 471f21f..0000000 --- a/templates/connect/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Establish a connection -- cgit v1.2.3