From 020ac78e7f35bb2e3fc8883d2135075c778c62e2 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 4 May 2012 20:45:44 +0000 Subject: [PATCH] Be content with just a boot.cfg..tmpl file git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12533 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 3e78a7c9b..a28cfae61 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -4642,12 +4642,16 @@ sub cpNetbootImages { } }elsif ($osver =~ /esxi5/) { #we need boot.cfg.stateles - if (! -r "$srcDir/boot.cfg.$bootmode" and ! -r "$overridedir/boot.cfg.$bootmode") { + my @filestocopy = ("boot.cfg.$bootmode"); + if (-r "$srcDir/boot.cfg.$bootmode" or -r "$overridedir/boot.cfg.$bootmode") { + @filestocopy = ("boot.cfg.$bootmode"); + } elsif (-r "$srcDir/boot.cfg.$bootmode.tmpl" or -r "$overridedir/boot.cfg.$bootmode.tmpl") { + @filestocopy = ("boot.cfg.$bootmode.tmpl"); + } else { xCAT::SvrUtils::sendmsg([1,"$srcDir is missing boot.cfg.$bootmode file required for $bootmode boot"], $output_handler); return; } my $statelesscfg; - my @filestocopy = ("boot.cfg.$bootmode"); if (-r "$overridedir/boot.cfg.$bootmode.tmpl") { open ($statelesscfg,"<","$overridedir/boot.cfg.$bootmode.tmpl"); @filestocopy = ("boot.cfg.$bootmode.tmpl");