tests: Interface number in "ip link show" stub defaults to 42
authorMartin Schwenke <martin@meltin.net>
Wed, 8 Jul 2015 11:39:51 +0000 (21:39 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Thu, 16 Jul 2015 04:35:16 +0000 (14:35 +1000)
It needs to have a default for the standalone case, when it is not run
in a loop inside "ip addr show".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(Imported from commit 4f84d42b511a4c9a79bd835eeca0a80082e76227)

tests/eventscripts/stubs/ip

index e8f17d841313b3dd8003f2d9d79cf556e86e4e65..660ad7e304214b3c45d17ed3e133b04f2bfaa4a6 100755 (executable)
@@ -66,7 +66,7 @@ ip_link_show ()
        _state="DOWN"
        _flags=""
     fi
-    echo "${n}: ${dev}: <BROADCAST,MULTICAST${_flags}> mtu 1500 qdisc pfifo_fast state ${_state} qlen 1000"
+    echo "${n:-42}: ${dev}: <BROADCAST,MULTICAST${_flags}> mtu 1500 qdisc pfifo_fast state ${_state} qlen 1000"
     echo "    link/ether ${mac} brd ff:ff:ff:ff:ff:ff"
 }