From c045bdb945a9ee5f823ff26e936e8d73b027ae06 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Fri, 2 Apr 2010 11:09:24 +0000 Subject: [PATCH] Format the mac address to Linux mode before using on Linux OS git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5655 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/dhcp.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 357cc8ae7..60ef5a183 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -269,6 +269,12 @@ sub addnode } else { + if ( !grep /:/,$mac ) { + $mac = lc($mac); + $mac =~ s/(\w{2})/$1:/g; + $mac =~ s/:$//; + } + #syslog("local4|err", "Setting $node ($hname|$ip) to " . $mac); print $omshell "new host\n"; print $omshell