diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-07-08 16:31:21 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-07-08 12:48:06 +0200 |
commit | bf7f2b06e8e36710d0f9bf0684e70538e809dd16 (patch) | |
tree | 637a8635798345dc990aa492f0062cd6c1032c52 | |
parent | 34be43d2018d5d76d4861992a0405bde22656fb2 (diff) | |
download | samba-bf7f2b06e8e36710d0f9bf0684e70538e809dd16.tar.gz samba-bf7f2b06e8e36710d0f9bf0684e70538e809dd16.tar.xz samba-bf7f2b06e8e36710d0f9bf0684e70538e809dd16.zip |
ctdb-tests: Do not run ip command if running against local daemons
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Tue Jul 8 12:48:06 CEST 2014 on sn-devel-104
-rwxr-xr-x | ctdb/tests/simple/16_ctdb_config_add_ip.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ctdb/tests/simple/16_ctdb_config_add_ip.sh b/ctdb/tests/simple/16_ctdb_config_add_ip.sh index b770bd6a6a..dc28130a19 100755 --- a/ctdb/tests/simple/16_ctdb_config_add_ip.sh +++ b/ctdb/tests/simple/16_ctdb_config_add_ip.sh @@ -64,9 +64,12 @@ echo "Selected node ${test_node} with IPs: $test_node_ips" # Try to find a free IP adddress. This is inefficient but should # succeed quickly. -try_command_on_node $test_node "ip addr show" -all_test_node_ips=$(echo "$out" | sed -rn -e 's@^[[:space:]]+inet[[:space:]]+([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/[[:digit:]]+).*[[:space:]]([^[:space:]]+)+$@\1:\2@p') - +if [ -z "$TEST_LOCAL_DAEMONS" ] ; then + try_command_on_node $test_node "ip addr show" + all_test_node_ips=$(echo "$out" | sed -rn -e 's@^[[:space:]]+inet[[:space:]]+([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/[[:digit:]]+).*[[:space:]]([^[:space:]]+)+$@\1:\2@p') +else + all_test_node_ips="" +fi add_ip="" # Use an IP already on one of the nodes, remove the last octet and |