mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 03:12:30 +00:00 
			
		
		
		
	fix defect #4682 [DEV]Sles12 diskfull compute install failed with multiple mac address
This commit is contained in:
		| @@ -4476,24 +4476,23 @@ sub cleanup_for_powerLE_hardware_discovery { | ||||
| #This may be simply a mac address, which would be bound to the node name (such as "01:02:03:04:05:0E").   | ||||
| #This may also be a "|" delimited string of "mac address!hostname" format (such as "01:02:03:04:05:0E!node5|01:02:03:05:0F!node6-eth1"). | ||||
| sub parseMacTabEntry{ | ||||
|  | ||||
|     my $macString=shift; | ||||
|     if( $macString =~ /xCAT::Utils/)     { | ||||
|     if( $macString =~ /xCAT::Utils/){ | ||||
|         $macString=shift; | ||||
|     } | ||||
|     my $HostName=shift; | ||||
|      | ||||
|     my $HostName=shift; | ||||
|     my $mac_ret; | ||||
|     my @macEntry=split(/\|/,$macString); | ||||
|      | ||||
|     foreach my $mac_t  (@macEntry){ | ||||
|         if($mac_t =~ /!/){ | ||||
|             if($mac_t =~ /(.+)!$HostName$/){ | ||||
|                 $mac_ret=$1; | ||||
|             } | ||||
|         }else{ | ||||
|         unless($mac_t =~ /!/){ | ||||
|             $mac_ret=$mac_t; | ||||
|         } | ||||
|  | ||||
|         if($HostName and $mac_t =~ /(.+)\!$HostName$/){ | ||||
|                 $mac_ret=$1; | ||||
|                 last; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     if ($mac_ret) { | ||||
| @@ -4501,10 +4500,11 @@ sub parseMacTabEntry{ | ||||
|             $mac_ret =~ s/(..)(..)(..)(..)(..)(..)/$1:$2:$3:$4:$5:$6/; | ||||
|         } | ||||
|     } | ||||
|      | ||||
|  | ||||
|     return $mac_ret; | ||||
| } | ||||
|  | ||||
|  | ||||
| #The splitkcmdline subroutine is used to split the "persistent kernel options"  | ||||
| #and "provision-time kernel options" out of the kernel cmdline string | ||||
| #Arguments: | ||||
|   | ||||
| @@ -335,6 +335,7 @@ sub subvars { | ||||
|       $inc =~ s/#HOSTNAME#/$node/g; | ||||
|       $inc =~ s/#SHORTNAME#/$shortname/g; | ||||
|       $inc =~ s/#GETNODEDOMAIN:([^#]+)#/get_node_domain($1)/eg; | ||||
|       $inc =~ s/#GETPRINICMAC:([^#]+)#/xCAT::Utils::parseMacTabEntry(tabdb("mac",$1,"mac"),$1)/eg; | ||||
|      | ||||
|       my $nrtab = xCAT::Table->new("noderes"); | ||||
|       my $tftpserver = $nrtab->getNodeAttribs($node, ['tftpserver']); | ||||
|   | ||||
| @@ -40,7 +40,7 @@ chmod 755 /tmp/updateflag.awk | ||||
| export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic# | ||||
| if [ "$PRINIC" == "mac" ] | ||||
| then | ||||
|     export PRINIC='#TABLE:mac:THISNODE:mac#' | ||||
|     export PRINIC='#GETPRINICMAC:THISNODE#' | ||||
| fi | ||||
| if [ -z "$PRINIC" ] | ||||
| then | ||||
|   | ||||
| @@ -6,7 +6,7 @@ echo "post scripts" >/root/post.log | ||||
| export PRINIC=#TABLE:noderes:THISNODE:primarynic# | ||||
| if [ "$PRINIC" == "mac" ] | ||||
| then | ||||
|     export PRINIC='#TABLE:mac:THISNODE:mac#' | ||||
|     export PRINIC='#GETPRINICMAC:THISNODE#' | ||||
| fi | ||||
| if [ -z "$PRINIC" ] | ||||
| then | ||||
|   | ||||
| @@ -7,7 +7,7 @@ echo "post scripts" >/root/post.log | ||||
| export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic# | ||||
| if [ "$PRINIC" == "mac" ] | ||||
| then | ||||
|     export PRINIC='#TABLE:mac:THISNODE:mac#' | ||||
|     export PRINIC='#GETPRINICMAC:THISNODE#' | ||||
| fi | ||||
| if [ -z "$PRINIC" ] | ||||
| then | ||||
|   | ||||
| @@ -6,7 +6,7 @@ echo "post scripts" >/root/post.log | ||||
| export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic# | ||||
| if [ "$PRINIC" == "mac" ] | ||||
| then | ||||
|     export PRINIC='#TABLE:mac:THISNODE:mac#' | ||||
|     export PRINIC='#GETPRINICMAC:THISNODE#'     | ||||
| fi | ||||
| if [ -z "$PRINIC" ] | ||||
| then | ||||
|   | ||||
		Reference in New Issue
	
	Block a user