From 02da07204612671e9093aeb4d914b6d2a2bc3fc1 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Sat, 1 Jul 2023 20:13:05 +0300 Subject: [PATCH] Add script --- pppoe/add_accel_vlans.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pppoe/add_accel_vlans.sh diff --git a/pppoe/add_accel_vlans.sh b/pppoe/add_accel_vlans.sh new file mode 100644 index 0000000..1c63e7d --- /dev/null +++ b/pppoe/add_accel_vlans.sh @@ -0,0 +1,12 @@ +#!/bin/sh +cat /etc/accel-ppp.conf | grep "^interface=" | awk -F ',' '{ print $1; }' | awk -F '=' '{ print $2; }' | awk -F '.' '{ print $2; }' | while read VLANID; do + echo Adding VLAN $VLANID + ip link add link bond0 name bond0.$VLANID type vlan id $VLANID + ip link set dev bond0.$VLANID up +done + +cat /etc/accel-ppp.conf | grep "^interface=" | awk -F '=' '{ print $2; }' | while read IFACCEL; do + # add to accel live + echo ${IFACCEL} + accel-cmd "pppoe interface add ${IFACCEL}" +done