From 6e8432d98b18c7091b93ea93f75b6c6c7c01eaa1 Mon Sep 17 00:00:00 2001 From: wanghuaz Date: Thu, 8 Jul 2010 22:21:03 +0000 Subject: [PATCH] mkdklsnode support HFI devices. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6681 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/aixinstall.pm | 29 +++++++++++++++++----- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/aixinstall.pm b/xCAT-server/lib/xcat/plugins/aixinstall.pm index ef1dc30e5..3d67c092f 100644 --- a/xCAT-server/lib/xcat/plugins/aixinstall.pm +++ b/xCAT-server/lib/xcat/plugins/aixinstall.pm @@ -5751,6 +5751,7 @@ sub prenimnodeset !GetOptions( 'f|force' => \$::FORCE, 'h|help' => \$::HELP, + 'hfi' => \$::HFI, 'i=s' => \$::OSIMAGE, 'n|new' => \$::NEWNAME, 'verbose|V' => \$::VERBOSE, @@ -6882,6 +6883,7 @@ sub mkdsklsnode !GetOptions( 'f|force' => \$::FORCE, 'h|help' => \$::HELP, + 'hfi' => \$::HFI, 'i=s' => \$::OSIMAGE, 'n|new' => \$::NEWNAME, 'verbose|V' => \$::VERBOSE, @@ -7237,17 +7239,32 @@ sub mkdsklsnode } else { $mac_or_local_link_addr = $objhash{$node}{'mac'}; # only support Ethernet for management interfaces - $adaptertype = "ent"; + if ($::HFI) + { + $adaptertype = "hfi0"; + } else { + $adaptertype = "ent"; + } $netmask = $nethash{$node}{'mask'}; } - $defcmd .= - "-a if1='find_net $nodeshorthost $mac_or_local_link_addr $adaptertype' "; + my $netname = $nethash{$node}{'netname'}; + if (!$::HFI) + { + $defcmd .= + "-a if1='find_net $nodeshorthost $mac_or_local_link_addr $adaptertype' "; + } else { + $defcmd .= + "-a if1='$netname $nodeshorthost $mac_or_local_link_addr $adaptertype' "; + } } $defcmd .= "-a cable_type1=N/A -a netboot_kernel=mp "; - $defcmd .= - "-a net_definition='$adaptertype $netmask $nethash{$node}{'gateway'}' "; - $defcmd .= "-a net_settings1='$speed $duplex' "; + if (!$::HFI) + { + $defcmd .= + "-a net_definition='$adaptertype $netmask $nethash{$node}{'gateway'}' "; + $defcmd .= "-a net_settings1='$speed $duplex' "; + } # add any additional supported attrs from cmd line my @attrlist = ("dump_iscsi_port");