From 07b90103fcee7e6ec096f941fd4688923b8cf768 Mon Sep 17 00:00:00 2001 From: Doug Knight Date: Fri, 7 Oct 2011 11:59:17 -0800 Subject: Only use the first ARP response in netconsole (#744309) --- rc.d/init.d/netconsole | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rc.d/init.d/netconsole') diff --git a/rc.d/init.d/netconsole b/rc.d/init.d/netconsole index 7f91a6c6..42733de0 100644 --- a/rc.d/init.d/netconsole +++ b/rc.d/init.d/netconsole @@ -54,7 +54,7 @@ print_address_info () target=$host fi if [ -z "$SYSLOGMACADDR" ]; then - arp=$(LANG=C /sbin/arping -c 1 -I $DEV $target 2>/dev/null | awk '/ reply from .*[.*]/ { print gensub(".* reply from .* \\[(.*)\\].*","\\1","G") }') + arp=$(LANG=C /sbin/arping -c 1 -I $DEV $target 2>/dev/null | awk '/ reply from .*[.*]/ { print gensub(".* reply from .* \\[(.*)\\].*","\\1","G"); exit }') [ -n "$arp" ] && echo "SYSLOGMACADDR=$arp" fi } -- cgit v1.2.1