summaryrefslogtreecommitdiff
path: root/data/templates
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-06-12 13:17:13 +0200
committerChristian Poessinger <christian@poessinger.com>2021-06-13 09:36:35 +0200
commitc2a1c071e7d0a9ca754d7f5016eed7db188b3d1a (patch)
tree7852a72bb7e7412bcec63371dc8461f1cc6556ed /data/templates
parentc88d8999873db638aa2c05d479502cedd1afd142 (diff)
downloadvyos-1x-c2a1c071e7d0a9ca754d7f5016eed7db188b3d1a.tar.gz
vyos-1x-c2a1c071e7d0a9ca754d7f5016eed7db188b3d1a.zip
wwan: T3620: rename "wirelessmodem wlm" interfaces to new wwan interface tree
Diffstat (limited to 'data/templates')
-rw-r--r--data/templates/wwan/chat.tmpl10
-rw-r--r--data/templates/wwan/ip-down.script.tmpl27
-rw-r--r--data/templates/wwan/ip-pre-up.script.tmpl23
-rw-r--r--data/templates/wwan/ip-up.script.tmpl25
-rw-r--r--data/templates/wwan/peer.tmpl31
5 files changed, 0 insertions, 116 deletions
diff --git a/data/templates/wwan/chat.tmpl b/data/templates/wwan/chat.tmpl
deleted file mode 100644
index 386af37e6..000000000
--- a/data/templates/wwan/chat.tmpl
+++ /dev/null
@@ -1,10 +0,0 @@
-ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT 'NO CARRIER' ABORT DELAYED
-'' AT
-OK ATZ
-{% if ipv6 is defined and ipv6.address is defined and ipv6.address.autoconf is defined %}
-OK 'AT+CGDCONT=1,"IPV4V6","{{ apn }}"'
-{% else %}
-OK 'AT+CGDCONT=1,"IP","{{ apn }}"'
-{% endif %}
-OK ATD*99#
-CONNECT ''
diff --git a/data/templates/wwan/ip-down.script.tmpl b/data/templates/wwan/ip-down.script.tmpl
deleted file mode 100644
index 9dc15ea99..000000000
--- a/data/templates/wwan/ip-down.script.tmpl
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/sh
-
-# Script parameters will be like:
-# wlm0 /dev/serial/by-bus/usb0b1.3p1.3 115200 10.100.118.91 10.64.64.64 wlm0
-
-# Only applicable for Wireless Modems (WWAN)
-if [ -z $(echo $2 | egrep "(ttyS[0-9]+|usb[0-9]+b.*)$") ]; then
- exit 0
-fi
-
-# Determine if we are running inside a VRF or not, required for proper routing table
-# NOTE: the down script can not be properly templated as we need the VRF name,
-# which is not present on deletion, thus we read it from the operating system.
-if [ -d /sys/class/net/{{ ifname }}/upper_* ]; then
- # Determine upper (VRF) interface
- VRF=$(basename $(ls -d /sys/class/net/{{ ifname }}/upper_*))
- # Remove upper_ prefix from result string
- VRF_NAME=${VRF#"upper_"}
- # Remove default route from VRF routing table
- vtysh -c "conf t" -c "vrf ${VRF_NAME}" -c "no ip route 0.0.0.0/0 {{ ifname }}"
-else
- # Remove default route from GRT (global routing table)
- vtysh -c "conf t" -c "no ip route 0.0.0.0/0 {{ ifname }}"
-fi
-
-DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
-logger -t pppd[$DIALER_PID] "removed default route via {{ ifname }} metric {{ backup.distance }}"
diff --git a/data/templates/wwan/ip-pre-up.script.tmpl b/data/templates/wwan/ip-pre-up.script.tmpl
deleted file mode 100644
index 199150947..000000000
--- a/data/templates/wwan/ip-pre-up.script.tmpl
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# As WWAN is an "on demand" interface we need to re-configure it when it
-# becomes 'up'
-
-ipparam=$6
-
-# device name and metric are received using ipparam
-device=`echo "$ipparam"|awk '{ print $1 }'`
-
-if [ "$device" != "{{ ifname }}" ]; then
- exit
-fi
-
-# add some info to syslog
-DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
-logger -t pppd[$DIALER_PID] "executing $0"
-
-echo "{{ description }}" > /sys/class/net/{{ ifname }}/ifalias
-
-{% if vrf %}
-logger -t pppd[$DIALER_PID] "configuring interface {{ ifname }} for VRF {{ vrf }}"
-ip link set dev {{ ifname }} master {{ vrf }}
-{% endif %}
diff --git a/data/templates/wwan/ip-up.script.tmpl b/data/templates/wwan/ip-up.script.tmpl
deleted file mode 100644
index 2603a0286..000000000
--- a/data/templates/wwan/ip-up.script.tmpl
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/bin/sh
-
-# Script parameters will be like:
-# wlm0 /dev/serial/by-bus/usb0b1.3p1.3 115200 10.100.118.91 10.64.64.64 wlm0
-
-# Only applicable for Wireless Modems (WWAN)
-if [ -z $(echo $2 | egrep "(ttyS[0-9]+|usb[0-9]+b.*)$") ]; then
- exit 0
-fi
-
-# Determine if we are running inside a VRF or not, required for proper routing table
-if [ -d /sys/class/net/{{ ifname }}/upper_* ]; then
- # Determine upper (VRF) interface
- VRF=$(basename $(ls -d /sys/class/net/{{ ifname }}/upper_*))
- # Remove upper_ prefix from result string
- VRF_NAME=${VRF#"upper_"}
- # Remove default route from VRF routing table
- vtysh -c "conf t" -c "vrf ${VRF_NAME}" -c "ip route 0.0.0.0/0 {{ ifname }} {{ backup.distance }}"
-else
- # Remove default route from GRT (global routing table)
- vtysh -c "conf t" -c "ip route 0.0.0.0/0 {{ ifname }} {{ backup.distance }}"
-fi
-
-DIALER_PID=$(cat /var/run/{{ ifname }}.pid)
-logger -t pppd[$DIALER_PID] "added default route via {{ ifname }} metric {{ backup.distance }} ${VRF_NAME}"
diff --git a/data/templates/wwan/peer.tmpl b/data/templates/wwan/peer.tmpl
deleted file mode 100644
index 2807a79a4..000000000
--- a/data/templates/wwan/peer.tmpl
+++ /dev/null
@@ -1,31 +0,0 @@
-### Autogenerated by interfaces-wirelessmodem.py ###
-
-{{ "# description: " + description if description is defined }}
-ifname {{ ifname }}
-ipparam {{ ifname }}
-linkname {{ ifname }}
-
-{{ "usepeerdns" if no_peer_dns is defined }}
-# physical device
-{{ device }}
-lcp-echo-failure 0
-115200
-debug
-mtu {{ mtu }}
-mru {{ mtu }}
-{% if ipv6 is defined and ipv6.address is defined and ipv6.address.autoconf is defined %}
-+ipv6
-ipv6cp-use-ipaddr
-{% endif %}
-nodefaultroute
-ipcp-max-failure 4
-ipcp-accept-local
-ipcp-accept-remote
-noauth
-crtscts
-lock
-persist
-{{ "demand" if connect_on_demand is defined }}
-
-connect '/usr/sbin/chat -v -t6 -f /etc/ppp/peers/chat.{{ ifname }}'
-