diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-20 17:01:11 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-20 17:07:58 -0700 |
commit | 56c205f7070a541555c81bb8546d0a7ba4359e60 (patch) | |
tree | 70bc6af378ba01b1b59da398038c7b8b440b9f47 /scripts | |
parent | 4a97c98710323126bc0d36bbe4620162fb979a97 (diff) | |
download | vyatta-cfg-qos-56c205f7070a541555c81bb8546d0a7ba4359e60.tar.gz vyatta-cfg-qos-56c205f7070a541555c81bb8546d0a7ba4359e60.zip |
Fix setting of actions on boot
The redirect and mirror actions were incorrectly using an end:
node, so they would fail on boot when combined with ifb.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-qos.pl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index b232ae2..9655371 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -303,6 +303,12 @@ sub apply_action{ unless($ingress); } +sub delete_action { + foreach my $dev (@_) { + system("sudo tc qdisc del dev $dev parent ffff: 2>/dev/null"); + } +} + sub usage { print <<EOF; usage: vyatta-qos.pl --list-policy direction @@ -318,7 +324,8 @@ EOF exit 1; } -my (@startList, @updateInterface, @deleteInterface, $updateAction); +my (@startList, @updateInterface, @deleteInterface); +my ($updateAction, $deleteAction); my ($listPolicy, @createPolicy, @applyPolicy, @deletePolicy); GetOptions( @@ -332,7 +339,7 @@ GetOptions( "apply-policy=s" => \@applyPolicy, "update-action=s" => \$updateAction, - + "delete-action=s" => \$deleteAction, ) or usage(); delete_interface(@deleteInterface) if ( @deleteInterface == 1); @@ -345,3 +352,4 @@ delete_policy(@deletePolicy) if ( @deletePolicy ); apply_policy(@applyPolicy) if ( @applyPolicy ); update_action($updateAction) if ( $updateAction ); +delete_action($deleteAction) if ( $deleteAction ); |