To support ospkgs enhancements to install/upgrade OS packages from Updates , we should put the OSPKGDIR attribute in the /xcatpost/mypostscript firstly

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13321 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2012-07-20 08:47:17 +00:00
parent ee64dabb27
commit 4d96588172

View File

@ -512,10 +512,51 @@ sub makescript
$stat = "netboot";
}
$ospkglist =
xCAT::SvrUtils->get_pkglist_file_name(
# generate the default imagename, and get its attributes
my $imagename = "$os-$arch-$provmethod-$profile";
my $linuximagetab = xCAT::Table->new('linuximage', -create => 1);
(my $ref1) =
$linuximagetab->getAttribs({imagename => $imagename},
'pkglist', 'pkgdir', 'otherpkglist',
'otherpkgdir');
if ($ref1)
{
if ($ref1->{'pkglist'})
{
$ospkglist = $ref1->{'pkglist'};
}
if ($ref1->{'pkgdir'})
{
push @scriptd, "OSPKGDIR=" . $ref1->{'pkgdir'} . "\n";
push @scriptd, "export OSPKGDIR\n";
}
if ($ref1->{'otherpkglist'})
{
$pkglist = $ref1->{'otherpkglist'};
}
if ($ref1->{'otherpkgdir'})
{
push @scriptd,
"OTHERPKGDIR=" . $ref1->{'otherpkgdir'} . "\n";
push @scriptd, "export OTHERPKGDIR\n";
}
}
if (!$ospkglist)
{
$ospkglist =
xCAT::SvrUtils->get_pkglist_file_name(
"$installroot/custom/$stat/$platform",
$profile, $os, $arch);
}
if (!$ospkglist)
{
$ospkglist =
@ -524,10 +565,14 @@ sub makescript
$profile, $os, $arch);
}
$pkglist =
xCAT::SvrUtils->get_otherpkgs_pkglist_file_name(
if (!$pkglist)
{
$pkglist =
xCAT::SvrUtils->get_otherpkgs_pkglist_file_name(
"$installroot/custom/$stat/$platform",
$profile, $os, $arch);
}
if (!$pkglist)
{
$pkglist =