From 7be3888cba2342a5e7ad2cd774af82558205711e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 13 Jul 2009 12:30:08 -0700 Subject: Fix perl error when attempting to delete qos policy Bug 4597 Don't print ARRAY() print the element of that array. (cherry picked from commit 24889117e3aa124071e13541d4a6b663476226a2) --- scripts/vyatta-qos.pl | 8 +++++--- 1 file 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; } } -- cgit v1.2.3