source: trunk/package/iproute2/files/30-teql @ 31311

Last change on this file since 31311 was 31311, checked in by jow, 5 years ago

iproute2: Add hotplug script to add slave devices to TEQL master

Resolves https://dev.openwrt.org/ticket/11192

Signed-off-by: David Woodhouse <dwmw2@…>

File size: 486 bytes
Line 
1#!/bin/sh
2
3. /etc/functions.sh
4
5if [ "$ACTION" != "ifup" ]; then
6        exit
7fi
8
9config_load network
10
11config_get teql $INTERFACE teql
12
13if [ "$teql" != "" ]; then
14    logger Adding device $DEVICE to TEQL master $teql
15    insmod sch_teql
16    tc qdisc add dev $DEVICE root $teql
17
18    # The kernel doesn't let us bring it up until it has at least one
19    # slave. So bring it up now, if it isn't already.
20    if ! cat /sys/class/net/$teql/carrier &>/dev/null; then
21        ifup $teql &
22    fi
23fi
Note: See TracBrowser for help on using the repository browser.