initial.pl 374 B

1234567891011121314151617181920212223
  1. my $cfg = $CONFIG->{simple_tc};
  2. print <<'END';
  3. #/bin/sh
  4. uci -q batch <<EOF
  5. END
  6. foreach my $name (sort keys %{$cfg}) {
  7. my $interface = $cfg->{$name};
  8. print "set gluon-simple-tc.$name=interface\n";
  9. for (qw(enabled ifname limit_egress limit_ingress)) {
  10. print "set gluon-simple-tc.$name.$_=$interface->{$_}\n";
  11. }
  12. }
  13. print <<END;
  14. commit gluon-simple-tc
  15. EOF
  16. END