Permalink
Browse files

Make netns-test.sh report interfaces that don't exist

Signed-off-by: Quentin Armitage <quentin@armitage.org.uk>
  • Loading branch information...
1 parent c30fd8a commit cc825b43a9bb64d3d49999504c53e14d5c0d5b0b @pqarmitage pqarmitage committed Aug 29, 2016
Showing with 8 additions and 4 deletions.
  1. +8 −4 test/netns-test.sh
View
@@ -135,12 +135,16 @@ while read line; do
fi
done
-# Now create any additional interfaces in the config that don't exist
-if [[ -n $CONF && -n $EXTRA_IF ]]; then
+# Now deal with any additional interfaces in the config that don't exist
+if [[ -n $CONF ]]; then
for if in $IFACES; do
if [[ ! $CREATED_IFACES =~ " $if " ]]; then
- $IPN link add $if type dummy
- $IPN link set up $if
+ if [[ -z $EXTRA_IF ]]; then
+ echo Interface $if specified in configuration file doesn\'t exist
+ else
+ $IPN link add $if type dummy
+ $IPN link set up $if
+ fi
fi
done
fi

0 comments on commit cc825b4

Please sign in to comment.