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
This commit is contained in:
linggao 2010-10-04 20:47:07 +00:00
parent 247916a0e0
commit 48f3a6f452

View File

@ -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 <nr> netboot|statelite if installnic/primarynic is set".};