arp command location is different between redhat and debian/ubuntu
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16216 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -4296,7 +4296,13 @@ sub process_request { | ||||
|     $invreq{command} = ['rinv']; | ||||
|     my $mac; | ||||
|     my $ip = $request->{'_xcat_clientip'}; | ||||
|     my $arptable = `/sbin/arp -n`; | ||||
|     my $arptable; | ||||
|     if ( -e "/etc/debian_version" ) { | ||||
|         $arptable = `/usr/sbin/arp -n`; | ||||
|     } | ||||
|     else{ | ||||
|         $arptable = `/sbin/arp -n`; | ||||
|     } | ||||
|     my @arpents = split /\n/,$arptable; | ||||
|     foreach  (@arpents) { | ||||
|       if (m/^($ip)\s+\S+\s+(\S+)\s/) { | ||||
|   | ||||
| @@ -689,7 +689,13 @@ sub process_request { | ||||
| 		$invreq{command} = ['rinv']; | ||||
| 		my $mac; | ||||
| 		my $ip = $request->{'_xcat_clientip'}; | ||||
| 		my $arptable = `/sbin/arp -n`; | ||||
| 		my $arptable; | ||||
|                 if ( -e "/etc/debian_version") { | ||||
|                     $arptable = `/usr/sbin/arp -n`; | ||||
|                 } | ||||
|                 else{ | ||||
|                     $arptable = `/sbin/arp -n`; | ||||
|                 } | ||||
| 		my @arpents = split /\n/,$arptable; | ||||
| 		foreach  (@arpents) { | ||||
| 			if (m/^($ip)\s+\S+\s+(\S+)\s/) { | ||||
|   | ||||
| @@ -1437,7 +1437,13 @@ sub findme{ | ||||
|     my $ip = $request->{'_xcat_clientip'}; | ||||
|     xCAT::MsgUtils->message('S', "Profield nodes discover: _xcat_clientip is $ip.\n"); | ||||
|     my $mac = ''; | ||||
|     my $arptable = `/sbin/arp -n`; | ||||
|     my $arptable; | ||||
|     if ( -e "/etc/debian_version" ){ | ||||
|         $arptable = `/usr/sbin/arp -n`; | ||||
|     } | ||||
|     else { | ||||
|         $arptable = `/sbin/arp -n`; | ||||
|     } | ||||
|     my @arpents = split /\n/,$arptable; | ||||
|     foreach  (@arpents) { | ||||
|         if (m/^($ip)\s+\S+\s+(\S+)\s/) { | ||||
|   | ||||
| @@ -71,7 +71,13 @@ sub findme { | ||||
|     if (defined $request->{nodetype} and $request->{nodetype}->[0] eq 'virtual') { | ||||
|         return; | ||||
|     } | ||||
|     my $arptable = `/sbin/arp -n`; | ||||
|     my $arptable; | ||||
|     if ( -e "/etc/debian_version") { | ||||
|         $arptable = `/usr/sbin/arp -n`; | ||||
|     } | ||||
|     else{  | ||||
|         $arptable = `/sbin/arp -n`; | ||||
|     } | ||||
|     my @arpents = split /\n/,$arptable; | ||||
|     foreach  (@arpents) { | ||||
|         if (m/^($ip)\s+\S+\s+(\S+)\s/) { | ||||
|   | ||||
| @@ -130,7 +130,13 @@ sub process_request { | ||||
| 	    #discovery working.  Food for thought. | ||||
| 	    return; | ||||
| 	} | ||||
| 	my $arptable = `/sbin/arp -n`; | ||||
| 	my $arptable; | ||||
|         if ( -e "/etc/debian_version") { | ||||
|             $arptable = `/usr/sbin/arp -n`; | ||||
|         } | ||||
|         else{ | ||||
|             $arptable = `/sbin/arp -n`; | ||||
|         } | ||||
| 	my @arpents = split /\n/,$arptable; | ||||
| 	foreach  (@arpents) { | ||||
| 	    if (m/^($ip)\s+\S+\s+(\S+)\s/) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user