summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-06-15 13:21:34 -0700
committerStephen Hemminger <shemminger@lenny.localdomain>2009-10-01 13:51:20 -0700
commitc22deb0c01bb270c61ff3aabd71c533567c293f7 (patch)
tree797327ea0b235f8019c98d70eac82e77931d06ee
parente653c208a4ac2e063bb56bbfdaf19f6e9d998e00 (diff)
downloadvyatta-cfg-qos-c22deb0c01bb270c61ff3aabd71c533567c293f7.tar.gz
vyatta-cfg-qos-c22deb0c01bb270c61ff3aabd71c533567c293f7.zip
Ignore deleted policy on end test
If policy is deleted, then the end: check is still run, but can be safely ignored. (cherry picked from commit 68312d5d735861153fbd28e5e3c98000761ca9a2)
-rwxr-xr-xscripts/vyatta-qos.pl5
1 files changed, 1 insertions, 4 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl
index 2576af1..9844d06 100755
--- a/scripts/vyatta-qos.pl
+++ b/scripts/vyatta-qos.pl
@@ -234,11 +234,8 @@ sub apply_policy {
foreach my $args (@usedby) {
update_interface( @$args );
}
- } else {
+ } elsif (my $policy = find_policy($name)) {
# Recheck the policy, might have new errors.
- my $policy = find_policy($name);
- die "Unknown policy name $name\n" unless $policy;
-
my $shaper = make_policy( $policy, $name );
exit 1 unless $shaper;
}