1
0

hotplug-sched-teql.sh 488 B

1234567891011121314151617181920212223
  1. #!/bin/sh
  2. . /lib/functions.sh
  3. if [ "$ACTION" != "ifup" ]; then
  4. exit
  5. fi
  6. config_load network
  7. config_get teql $INTERFACE teql
  8. if [ "$teql" != "" ]; then
  9. logger Adding device $DEVICE to TEQL master $teql
  10. modprobe sch_teql
  11. tc qdisc add dev $DEVICE root $teql
  12. # The kernel doesn't let us bring it up until it has at least one
  13. # slave. So bring it up now, if it isn't already.
  14. if ! cat /sys/class/net/$teql/carrier &>/dev/null; then
  15. ifup $teql &
  16. fi
  17. fi