diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-07-13 12:30:08 -0700 |
---|---|---|
committer | Stephen Hemminger <shemminger@lenny.localdomain> | 2009-10-01 13:51:21 -0700 |
commit | 7be3888cba2342a5e7ad2cd774af82558205711e (patch) | |
tree | 8d93377a57fe7b96dd42c40d445ce0bad558584a | |
parent | 4a86133a0d7a4d20887c2f2d726d1558f47c476b (diff) | |
download | vyatta-cfg-qos-7be3888cba2342a5e7ad2cd774af82558205711e.tar.gz vyatta-cfg-qos-7be3888cba2342a5e7ad2cd774af82558205711e.zip |
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)
-rwxr-xr-x | scripts/vyatta-qos.pl | 8 |
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; } } |