summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-27 14:49:09 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-07-27 14:49:09 -0700
commitf94f46058fce5ca110a24ef90935b0f517b16d33 (patch)
tree95dac443c66bb6a0572ca9f4fa5a71b0506dec95
parent0ea7ec1384ac895433f2b03405929f9d1d71d236 (diff)
downloadvyatta-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-xscripts/vyatta-qos.pl6
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 );