50-gluon-simple-tc 538 B

1234567891011121314151617181920212223242526
  1. [ "$ACTION" = 'add' ] || exit 0
  2. config_load gluon-simple-tc
  3. tc_interface() {
  4. local iface="$1"
  5. config_get ifname "$iface" ifname
  6. [ "$INTERFACE" = "$ifname" ] || return
  7. config_get_bool enabled "$iface" enabled 0
  8. [ "$enabled" -eq 1 ] || return
  9. config_get limit_ingress "$iface" limit_ingress
  10. config_get limit_egress "$iface" limit_egress
  11. [ "$limit_ingress" ] || limit_ingress=-
  12. [ "$limit_egress" ] || limit_egress=-
  13. gluon-simple-tc "$INTERFACE" "$limit_ingress" "$limit_egress"
  14. }
  15. config_foreach tc_interface 'interface'