#!/bin/bash test_info() { cat </dev/null 2>&1 || true echo "Pinging ${test_ip}..." ping -q -n -c 1 $test_ip echo "Getting MAC address associated with ${test_ip}..." original_mac=$(arp -n $test_ip | awk '$2 == "ether" {print $3}') [ $? -eq 0 ] echo "MAC address is: ${original_mac}" gratarp_sniff_start echo "Disabling node $test_node" try_command_on_node 1 $CTDB disable -n $test_node wait_until_node_has_status $test_node disabled gratarp_sniff_wait_show echo "Getting MAC address associated with ${test_ip} again..." new_mac=$(arp -n $test_ip | awk '$2 == "ether" {print $3}') [ $? -eq 0 ] echo "MAC address is: ${new_mac}" if [ "$original_mac" != "$new_mac" ] ; then echo "GOOD: MAC address changed" else echo "BAD: MAC address did not change" testfailures=1 fi