From c933502500dd5a1caf32b12021a09567e2735e26 Mon Sep 17 00:00:00 2001 From: immarvin Date: Tue, 8 Nov 2016 11:11:15 +0800 Subject: [PATCH] refine the dhcp conf for cumulus support --- xCAT-server/lib/xcat/plugins/dhcp.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 03f6ff2b9..9212e33df 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -694,7 +694,7 @@ sub addnode } elsif ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'petitboot') { $lstatements = 'option conf-file \"http://' . $nxtsrv . '/tftpboot/petitboot/' . $node . '\";' . $lstatements; } elsif ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'onie') { - $lstatements = 'if option vendor-class-identifier = \"onie_vendor:arm-accton_as4610_54-r0\" { option www-server = \"http://' . $nxtsrv . $ntent->{provmethod} . '\";}' . $lstatements; + $lstatements = 'if substring (option vendor-class-identifier,0,11) = \"onie_vendor\" { option www-server = \"http://' . $nxtsrv . $ntent->{provmethod} . '\";}' . $lstatements; } elsif ($nrent and $nrent->{netboot} and $nrent->{netboot} eq 'nimol') { $lstatements = 'supersede server.filename=\"/vios/nodes/' . $node . '\";' . $lstatements; } @@ -2649,6 +2649,9 @@ sub addnet " } else if option client-architecture = 00:0e { #OPAL-v3\n "; push @netent, " option conf-file = \"http://$tftp/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n"; push @netent, +" } else if substring (option vendor-class-identifier,0,11) = \"onie_vendor\" { #for onie on cumulus switch\n"; + push @netent, " option www-server = \"http://install/onie/onie-installer\";\n"; + push @netent, " } else if substring(filename,0,1) = null { #otherwise, provide yaboot if the client isn't specific\n "; push @netent, " filename \"/yaboot\";\n"; push @netent, " }\n";