2013-10-03 19:10:29 +00:00
|
|
|
my $cfg = $CONFIG->{simple_tc};
|
|
|
|
|
|
|
|
print <<'END';
|
|
|
|
#/bin/sh
|
|
|
|
|
|
|
|
uci -q batch <<EOF
|
|
|
|
END
|
|
|
|
|
2013-10-04 08:47:31 +00:00
|
|
|
foreach my $name (sort keys %{$cfg}) {
|
|
|
|
my $interface = $cfg->{$name};
|
|
|
|
|
2013-10-03 19:10:29 +00:00
|
|
|
print "set gluon-simple-tc.$name=interface\n";
|
|
|
|
|
2013-10-04 08:47:31 +00:00
|
|
|
for (qw(enabled ifname limit_egress limit_ingress)) {
|
2013-10-03 19:10:29 +00:00
|
|
|
print "set gluon-simple-tc.$name.$_=$interface->{$_}\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
print <<END;
|
|
|
|
|
|
|
|
commit gluon-simple-tc
|
|
|
|
EOF
|
|
|
|
END
|