From a8c44b2c1ab78cd9fff2a2ee5a559549656a8943 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Wed, 2 Mar 2011 11:05:29 +0000 Subject: [PATCH] for defect 3197146, if rootfstype is ramdisk, then the initial-stateless.gz file should be copied when nodeset command is running. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8966 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/anaconda.pm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 32a1b3fa0..6024b9a12 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -415,7 +415,11 @@ sub mknetboot } copy("$rootimgdir/kernel", "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); if ($statelite) { - copy("$rootimgdir/initrd-statelite.gz", "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); + if($rootfstype eq "ramdisk") { + copy("$rootimgdir/initrd-stateless.gz", "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); + } else { + copy("$rootimgdir/initrd-statelite.gz", "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); + } } else { copy("$rootimgdir/initrd-stateless.gz", "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"); } @@ -424,8 +428,14 @@ sub mknetboot if ($statelite) { + my $initrdloc = "/$tftpdir/xcat/netboot/$osver/$arch/$profile/"; + if ($rootfstype eq "ramdisk") { + $initrdloc .= "initrd-stateless.gz"; + } else { + $initrdloc .= "initrd-statelite.gz"; + } unless ( -r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/kernel" - and -r "/$tftpdir/xcat/netboot/$osver/$arch/$profile/initrd-statelite.gz") { + and -r $initrdloc ) { $callback->({ error=>[qq{copying to /$tftpdir/xcat/netboot/$osver/$arch/$profile failed}], errorcode=>[1]