summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-13 12:30:08 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-13 12:30:08 -0700
commit24889117e3aa124071e13541d4a6b663476226a2 (patch)
treee92e3e8a287237e0ebdf8fd4a20fc1aa9e9fdbee
parent2b757efa148459b025e317582604d19bdbe0b1d4 (diff)
downloadvyatta-cfg-qos-24889117e3aa124071e13541d4a6b663476226a2.tar.gz
vyatta-cfg-qos-24889117e3aa124071e13541d4a6b663476226a2.zip
Fix perl error when attempting to delete qos policy
Bug 4597 Don't print ARRAY() print the element of that array.
-rwxr-xr-xscripts/vyatta-qos.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl
index b7106c2..eb04ec8 100755
--- a/scripts/vyatta-qos.pl
+++ b/scripts/vyatta-qos.pl
@@ -183,7 +183,7 @@ sub update_interface {
}
-# return array of names using given qos-policy
+# return array of references to (name, direction, policy)
sub interfaces_using {
my $policy = shift;
my $config = new Vyatta::Config;
@@ -210,9 +210,11 @@ sub interfaces_using {
# check if policy name(s) are still in use
sub delete_policy {
while ( my $name = shift ) {
- my @inuse = interfaces_using($name);
+ # interfaces_using returns array of array and only want name
+ my @inuse = map { @$_[0] } interfaces_using($name);
- die "QoS policy still in use on ", join( ' ', @inuse ), "\n"
+ die "Can not delete qos-policy $name, still applied"
+ . " to interface ", join(' ', @inuse), "\n"
if @inuse;
}
}