1234567891011121314151617181920212223242526 |
- [ "$ACTION" = 'add' ] || exit 0
- config_load gluon-simple-tc
- tc_interface() {
- local iface="$1"
- config_get ifname "$iface" ifname
- [ "$INTERFACE" = "$ifname" ] || return
- config_get_bool enabled "$iface" enabled 0
- [ "$enabled" -eq 1 ] || return
- config_get limit_ingress "$iface" limit_ingress
- config_get limit_egress "$iface" limit_egress
- [ "$limit_ingress" ] || limit_ingress=-
- [ "$limit_egress" ] || limit_egress=-
- gluon-simple-tc "$INTERFACE" "$limit_ingress" "$limit_egress"
- }
- config_foreach tc_interface 'interface'
|