mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-10-30 21:44:27 -04:00 
			
		
		
		
	The link equalizer sch_teql.ko of package kmod-sched relies on a hotplug script historically included in iproute2's tc package. In previous discussion [1], consensus was the hotplug script is best located together with the module in kmod-sched, but this change was deferred at the time. Relocate the hotplug script now. This change also simplifies adding a tc variant for minimal size with reduced functionality. [1] https://github.com/openwrt/openwrt/pull/1627#issuecomment-447923636 Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
		
			
				
	
	
		
			24 lines
		
	
	
		
			486 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			486 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/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
 |