From e1a21649ffb4610f3b9155bea8787a7c8f79119f Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 10 May 2013 13:29:23 +0000 Subject: [PATCH] Check more directly for location of arp (TODO: stop using arp, use ip neigh) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16234 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/blade.pm | 2 +- xCAT-server/lib/xcat/plugins/hpblade.pm | 2 +- xCAT-server/lib/xcat/plugins/profilednodes.pm | 2 +- xCAT-server/lib/xcat/plugins/seqdiscovery.pm | 2 +- xCAT-server/lib/xcat/plugins/switch.pm | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/blade.pm b/xCAT-server/lib/xcat/plugins/blade.pm index b97d3b15e..30205c137 100644 --- a/xCAT-server/lib/xcat/plugins/blade.pm +++ b/xCAT-server/lib/xcat/plugins/blade.pm @@ -4297,7 +4297,7 @@ sub process_request { my $mac; my $ip = $request->{'_xcat_clientip'}; my $arptable; - if ( -e "/etc/debian_version" ) { + if ( -x "/usr/sbin/arp" ) { $arptable = `/usr/sbin/arp -n`; } else{ diff --git a/xCAT-server/lib/xcat/plugins/hpblade.pm b/xCAT-server/lib/xcat/plugins/hpblade.pm index 7a701ab78..1322d2708 100755 --- a/xCAT-server/lib/xcat/plugins/hpblade.pm +++ b/xCAT-server/lib/xcat/plugins/hpblade.pm @@ -690,7 +690,7 @@ sub process_request { my $mac; my $ip = $request->{'_xcat_clientip'}; my $arptable; - if ( -e "/etc/debian_version") { + if ( -x "/usr/sbin/arp") { $arptable = `/usr/sbin/arp -n`; } else{ diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index 819046ee3..fa5ee2d47 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -1438,7 +1438,7 @@ sub findme{ xCAT::MsgUtils->message('S', "Profield nodes discover: _xcat_clientip is $ip.\n"); my $mac = ''; my $arptable; - if ( -e "/etc/debian_version" ){ + if ( -x "/usr/sbin/arp" ){ $arptable = `/usr/sbin/arp -n`; } else { diff --git a/xCAT-server/lib/xcat/plugins/seqdiscovery.pm b/xCAT-server/lib/xcat/plugins/seqdiscovery.pm index 4e272b91f..7cc1a407b 100644 --- a/xCAT-server/lib/xcat/plugins/seqdiscovery.pm +++ b/xCAT-server/lib/xcat/plugins/seqdiscovery.pm @@ -72,7 +72,7 @@ sub findme { return; } my $arptable; - if ( -e "/etc/debian_version") { + if ( -x "/usr/sbin/arp") { $arptable = `/usr/sbin/arp -n`; } else{ diff --git a/xCAT-server/lib/xcat/plugins/switch.pm b/xCAT-server/lib/xcat/plugins/switch.pm index 9deda931a..29b00a4bc 100644 --- a/xCAT-server/lib/xcat/plugins/switch.pm +++ b/xCAT-server/lib/xcat/plugins/switch.pm @@ -131,7 +131,7 @@ sub process_request { return; } my $arptable; - if ( -e "/etc/debian_version") { + if ( -x "/usr/sbin/arp") { $arptable = `/usr/sbin/arp -n`; } else{