From 48f3a6f45277cc06cc9986576b4cf9ac3e9c268a Mon Sep 17 00:00:00 2001 From: linggao Date: Mon, 4 Oct 2010 20:47:07 +0000 Subject: [PATCH] making sure mac has : in ifname for kernel command line git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7751 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 4213fac10..57a03f980 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -559,6 +559,10 @@ sub mknetboot # TODO: currently, only "mac" attribute with classic style is used, the "|" delimited string of "macaddress!hostname" format is not used $mac = $machash->{$node}->[0]->{'mac'}; if ( (index($mac, "|") eq -1) and (index($mac, "!") eq -1) ) { + #convert to linux format + if ($mac !~ /:/) { + $mac =~s/(..)(..)(..)(..)(..)(..)/$1:$2:$3:$4:$5:$6/; + } $kcmdline .= "$mac "; } else { die qq{In the "mac" table, the "|" delimited string of "macaddress!hostname" format is not supported by "nodeset netboot|statelite if installnic/primarynic is set".};