From 10a1973aae887b20ad3790991d99839f01cc70d0 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 22 Aug 2013 07:05:41 -0400 Subject: [PATCH] make geninitrd could run against statelite image to generate initrd --- xCAT-server/lib/xcat/plugins/geninitrd.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/geninitrd.pm b/xCAT-server/lib/xcat/plugins/geninitrd.pm index 9a9fe45f1..18782cb99 100644 --- a/xCAT-server/lib/xcat/plugins/geninitrd.pm +++ b/xCAT-server/lib/xcat/plugins/geninitrd.pm @@ -116,7 +116,7 @@ sub geninitrd { $netdrivers = $lient->{'netdrivers'}; # if the provmethod equals 'netboot', call the genimage --onlyinitrd directly - if ($oient->{'provmethod'} && $oient->{'provmethod'} eq "netboot") { + if ($oient->{'provmethod'} && ($oient->{'provmethod'} eq "netboot" || $oient->{'provmethod'} eq "statelite")) { if ($lient->{'rootimgdir'}) { unless (-d $lient->{'rootimgdir'}."/rootimg/lib/modules") { xCAT::MsgUtils->message("E", {error=>["The genimage should be run before running geninitrd."], errorcode=>["1"]}, $callback); @@ -132,7 +132,7 @@ sub geninitrd { # arg => [$osimage, '--onlyinitrd'] }, $callback); return; } elsif (!$oient->{'provmethod'} || $oient->{'provmethod'} ne "install") { - xCAT::MsgUtils->message("E", {error=>["The attribute [provmethod] for osimage [$osimage] must be set to install or netboot."], errorcode=>["1"]}, $callback); + xCAT::MsgUtils->message("E", {error=>["The attribute [provmethod] for osimage [$osimage] must be set to install, netboot or statelite."], errorcode=>["1"]}, $callback); return; }