Ticket #11192: 01-teql

File 01-teql, 486 bytes (added by dwmw2@…, 6 years ago)

hotplug script for teql

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