for defect 3293662, the "nodeset statelite" command will detect the rootfstype attribute automatically for both sles and redhat
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9516 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
049835a125
commit
e352f73e51
@ -314,6 +314,25 @@ sub mknetboot
|
||||
} else {
|
||||
$imgname = "$osver-$arch-netboot-$profile";
|
||||
}
|
||||
|
||||
|
||||
if (! $osimagetab) {
|
||||
$osimagetab = xCAT::Table->new('osimage');
|
||||
}
|
||||
|
||||
if ($osimagetab) {
|
||||
my ($ref1) = $osimagetab->getAttribs({imagename => $imgname}, 'rootfstype');
|
||||
if (($ref1) && ($ref1->{'rootfstype'})) {
|
||||
$rootfstype = $ref1->{'rootfstype'};
|
||||
}
|
||||
} else {
|
||||
$callback->(
|
||||
{ error => [ qq{Cannot find the linux image called "$osver-$arch-$provmethod-$profile", maybe you need to use the "nodeset <nr> osimage=<osimage name>" command to set the boot state} ],
|
||||
errorcode => [1]}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if ( ! $linuximagetab ) {
|
||||
$linuximagetab = xCAT::Table->new('linuximage');
|
||||
}
|
||||
|
@ -151,6 +151,29 @@ sub mknetboot
|
||||
$arch = $ent->{arch};
|
||||
$profile = $ent->{profile};
|
||||
$rootfstype = "nfs"; # TODO: try to get it from the option or table
|
||||
my $imgname;
|
||||
if ($statelite) {
|
||||
$imgname = "$osver-$arch-statelite-$profile";
|
||||
} else {
|
||||
$imgname = "$osver-$arch-netboot-$profile";
|
||||
}
|
||||
|
||||
if (! $osimagetab) {
|
||||
$osimagetab = xCAT::Table->new('osimage');
|
||||
}
|
||||
|
||||
if ($osimagetab) {
|
||||
my ($ref1) = $osimagetab->getAttribs({imagename => $imgname}, 'rootfstype');
|
||||
if (($ref1) && ($ref1->{'rootfstype'})) {
|
||||
$rootfstype = $ref1->{'rootfstype'};
|
||||
}
|
||||
} else {
|
||||
$callback->(
|
||||
{ error => [ qq{Cannot find the linux image called "$osver-$arch-$provmethod-$profile", maybe you need to use the "nodeset <nr> osimage=<osimage name>" command to set the boot state} ],
|
||||
errorcode => [1]}
|
||||
);
|
||||
}
|
||||
|
||||
$rootimgdir="$installroot/netboot/$osver/$arch/$profile";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user