diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-05 10:49:07 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-05 10:49:07 -0800 |
commit | d8075f1b0189a8a788dd8c5b31f8dcbd4e652415 (patch) | |
tree | c9704332b634187d7f43090cd0c49b259ad7ddb5 /scripts | |
parent | e13559d7b6a386f8d7e1afaff4fe5b64da7297a8 (diff) | |
download | vyatta-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-x | scripts/vyatta-qos.pl | 5 |
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; } } |