diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-07-27 14:49:09 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-07-27 14:49:09 -0700 |
commit | f94f46058fce5ca110a24ef90935b0f517b16d33 (patch) | |
tree | 95dac443c66bb6a0572ca9f4fa5a71b0506dec95 | |
parent | 0ea7ec1384ac895433f2b03405929f9d1d71d236 (diff) | |
download | vyatta-cfg-qos-f94f46058fce5ca110a24ef90935b0f517b16d33.tar.gz vyatta-cfg-qos-f94f46058fce5ca110a24ef90935b0f517b16d33.zip |
Allow update to interface if not present yet
Solves issues like Bug 4759 where qos-policy is commited to
an interface that does not exist in system until later.
-rwxr-xr-x | scripts/vyatta-qos.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/vyatta-qos.pl b/scripts/vyatta-qos.pl index eb04ec8..487fdc6 100755 --- a/scripts/vyatta-qos.pl +++ b/scripts/vyatta-qos.pl @@ -155,6 +155,12 @@ sub update_interface { my $shaper = make_policy( $policy, $name, $direction ); exit 1 unless $shaper; + if ( ! -d "/sys/class/net/$device" ) { + warn "$device not present yet, qos-policy will be applied later\n"; + return; + } + + # Remove old policy delete_interface( $device, $direction ); |