summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-02-05 10:49:07 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-02-05 10:49:07 -0800
commitd8075f1b0189a8a788dd8c5b31f8dcbd4e652415 (patch)
treec9704332b634187d7f43090cd0c49b259ad7ddb5 /scripts
parente13559d7b6a386f8d7e1afaff4fe5b64da7297a8 (diff)
downloadvyatta-cfg-qos-d8075f1b0189a8a788dd8c5b31f8dcbd4e652415.tar.gz
vyatta-cfg-qos-d8075f1b0189a8a788dd8c5b31f8dcbd4e652415.zip
cleanup on failed commit
If commit of new policy fails, then remove all filters/qdisc.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vyatta-qos.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl
index 7680ea7..4ca96b8 100755
--- a/scripts/vyatta-qos.pl
+++ b/scripts/vyatta-qos.pl
@@ -76,7 +76,10 @@ sub update_interface {
}
$policy->commands($out, $interface);
- close $out or die "Tc command failed: $!\n";
+ if (! close $out && ! defined $debug) {
+ delete_interface($interface, $direction);
+ die "Tc commands failed\n";
+ }
exit 0;
}
}