From a8e0f4582194e55229970906d5c70dc68c9a71fe Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 25 Apr 2011 17:53:31 +0000 Subject: [PATCH] -Make boot.cfg filenames relative in ESXi5 boot.cfg setup git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9394 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/esx.pm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/esx.pm b/xCAT-server/lib/xcat/plugins/esx.pm index 5a0c682f7..e8664f6f7 100644 --- a/xCAT-server/lib/xcat/plugins/esx.pm +++ b/xCAT-server/lib/xcat/plugins/esx.pm @@ -3759,12 +3759,23 @@ sub copycd { open($bootcfg,"<","$installroot/$distname/$arch/boot.cfg"); my @bootcfg = <$bootcfg>; close($bootcfg); + foreach (@bootcfg) { #no point in optimizing trivial, infrequent code, readable this way + s!kernel=/!kernel=!; # remove leading / + s!modules=/!modules=!; #remove leading / + s!--- /!--- !g; #remove all the 'absolute' slashes + } + open($bootcfg,">","$installroot/$distname/$arch/boot.cfg.install"); + foreach (@bootcfg) { + print $bootcfg $_; + } + close($bootcfg); foreach (@bootcfg) { #no point in optimizing trivial, infrequent code, readable this way s/runweasel//; #don't run the installer in stateless mode s!--- /imgdb.tgz!!; #don't need the imgdb for stateless s!--- /imgpayld.tgz!!; #don't need the boot payload since we aren't installing s!--- /tools.t00!!; #tools could be useful, but for now skip the memory requirement s!--- /weaselin.i00!!; #and also don't need the weasel install images if... not installing + if (/^modules=/ and $_ !~ /xcatmod.tgz/) { chomp(); s! *\z! --- /xcatmod.tgz\n!;