diff options
Diffstat (limited to 'package/kernel/linux')
-rw-r--r-- | package/kernel/linux/files/hotplug-sched-teql.sh | 23 | ||||
-rw-r--r-- | package/kernel/linux/modules/netsupport.mk | 7 |
2 files changed, 30 insertions, 0 deletions
diff --git a/package/kernel/linux/files/hotplug-sched-teql.sh b/package/kernel/linux/files/hotplug-sched-teql.sh new file mode 100644 index 0000000000..a0c0e503aa --- /dev/null +++ b/package/kernel/linux/files/hotplug-sched-teql.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +. /lib/functions.sh + +if [ "$ACTION" != "ifup" ]; then + exit +fi + +config_load network + +config_get teql $INTERFACE teql + +if [ "$teql" != "" ]; then + logger Adding device $DEVICE to TEQL master $teql + insmod sch_teql + tc qdisc add dev $DEVICE root $teql + + # The kernel doesn't let us bring it up until it has at least one + # slave. So bring it up now, if it isn't already. + if ! cat /sys/class/net/$teql/carrier &>/dev/null; then + ifup $teql & + fi +fi diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk index 6bc8ba664a..f14928e18e 100644 --- a/package/kernel/linux/modules/netsupport.mk +++ b/package/kernel/linux/modules/netsupport.mk @@ -916,6 +916,13 @@ define KernelPackage/sched/description Extra kernel schedulers modules for IP traffic endef +SCHED_TEQL_HOTPLUG:=hotplug-sched-teql.sh + +define KernelPackage/sched/install + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/$(SCHED_TEQL_HOTPLUG) $(1)/etc/hotplug.d/iface/15-teql +endef + $(eval $(call KernelPackage,sched)) |