[Debian-ha-commits] [resource-agents] 06/08: debian/tests: use interface from first default route

Valentin Vidic vvidic-guest at moszumanska.debian.org
Sun Dec 3 17:06:12 UTC 2017


This is an automated email from the git hooks/post-receive script.

vvidic-guest pushed a commit to branch master
in repository resource-agents.

commit 0b7101f9cd78f462b24d4dfb27799f98fd68e103
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date:   Sun Dec 3 17:11:53 2017 +0100

    debian/tests: use interface from first default route
---
 debian/tests/IPaddr2 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/debian/tests/IPaddr2 b/debian/tests/IPaddr2
index 589800f..8124857 100755
--- a/debian/tests/IPaddr2
+++ b/debian/tests/IPaddr2
@@ -10,7 +10,8 @@ cleanup () {
 
 trap "cleanup" 0 2 3 15
 
-IFACE=$(ip route show 0/0 | cut -d ' ' -f 5)
+IFACE=$(ip route show 0/0 | head -n 1 | cut -d ' ' -f 5)
+echo "Using $IFACE as default route interface"
 sed "s/eth0/$IFACE/g" /usr/share/resource-agents/ocft/configs/$AGENT > $AUTOPKGTEST_TMP/$AGENT
 
 mkdir -p /run/resource-agents

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/resource-agents.git



More information about the Debian-HA-Commits mailing list