diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sles11.ppc64.otherpkgs.pkglist b/xCAT-server/share/xcat/netboot/sles/compute.sles11.otherpkgs.pkglist similarity index 100% rename from xCAT-server/share/xcat/netboot/sles/compute.sles11.ppc64.otherpkgs.pkglist rename to xCAT-server/share/xcat/netboot/sles/compute.sles11.otherpkgs.pkglist diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sles11.ppc64.pkglist b/xCAT-server/share/xcat/netboot/sles/compute.sles11.pkglist similarity index 89% rename from xCAT-server/share/xcat/netboot/sles/compute.sles11.ppc64.pkglist rename to xCAT-server/share/xcat/netboot/sles/compute.sles11.pkglist index 47a532e60..f1d55c54b 100644 --- a/xCAT-server/share/xcat/netboot/sles/compute.sles11.ppc64.pkglist +++ b/xCAT-server/share/xcat/netboot/sles/compute.sles11.pkglist @@ -3,7 +3,7 @@ bash nfs-utils #stunnel dhcpcd -kernel-ppc64 +kernel openssh #procps psmisc diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sles11.ppc64.postinstall b/xCAT-server/share/xcat/netboot/sles/compute.sles11.postinstall similarity index 100% rename from xCAT-server/share/xcat/netboot/sles/compute.sles11.ppc64.postinstall rename to xCAT-server/share/xcat/netboot/sles/compute.sles11.postinstall diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index cb2360569..d9d1231d9 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -153,19 +153,22 @@ unless ($onlyinitrd) { } #-- add custom repositories to the image - if (-r "$pathtofiles/$profile.repolist") { - $repolist = "$pathtofiles/$profile.repolist"; + if ( -r "$pathtofiles/$profile.$osver.$arch.repolist") { + $repolist = "$pathtofiles/$profile.$osver.$arch.repolist"; + }elsif ( -r "$pathtofiles/$profile.$osver.repolist") { + $repolist = "$pathtofiles/$profile.$osver.repolist"; + }elsif ( -r "$pathtofiles/$profile.repolist") { + $repolist = "$pathtofiles/$profile.repolist"; + } + + if ( -r "$repolist") { print "Reading custom repositories\n"; open($repoconfig,"<","$repolist"); while (<$repoconfig>) { chomp; next if /^\s*#/; ($repotype,$repourl,$repoalias) = split m/\|/; - if ($osver =~ /sles11/ && $osver_host == 11) { - system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ ar $repourl $repoalias"); - }else { - system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ sa -t $repotype $repourl $repoalias"); - } + system("zypper -R $installroot/netboot/$osver/$arch/$profile/rootimg/ ar $repourl $repoalias"); } } @@ -221,6 +224,13 @@ if (-x "$pathtofiles/$profile.$osver.$arch.postinstall") { exit 1; } } +elsif (-x "$pathtofiles/$profile.$osver.postinstall") { + my $rc = system("$pathtofiles/$profile.$osver.postinstall","$installroot/netboot/$osver/$arch/$profile/rootimg",$osver,$arch,$profile); + if ($rc) { + print "posinstall script failed\n"; + exit 1; + } +} elsif (-x "$pathtofiles/$profile.postinstall") { my $rc = system("$pathtofiles/$profile.postinstall","$installroot/netboot/$osver/$arch/$profile/rootimg",$osver,$arch,$profile); if ($rc) { diff --git a/xCAT-server/share/xcat/netboot/sles/service.repolist b/xCAT-server/share/xcat/netboot/sles/service.repolist index 875d869d5..e0426aecd 100644 --- a/xCAT-server/share/xcat/netboot/sles/service.repolist +++ b/xCAT-server/share/xcat/netboot/sles/service.repolist @@ -8,7 +8,3 @@ #Type|URL|name #-- example: #Plaindir|file:/install/sles10sp2/x86_64/custom|custom - -rpm-md|http://xcat.sourceforge.net/yum/xcat-dep/sles11/ppc64|xcat-dep -rpm-md|http://xcat.sourceforge.net/yum/devel/core-snap|core-snap -plaindir|file:///install/post/otherpkgs/sles11/ppc64|otherpkgs diff --git a/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.pkglist b/xCAT-server/share/xcat/netboot/sles/service.sles11.pkglist similarity index 100% rename from xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.pkglist rename to xCAT-server/share/xcat/netboot/sles/service.sles11.pkglist diff --git a/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.postinstall b/xCAT-server/share/xcat/netboot/sles/service.sles11.postinstall similarity index 98% rename from xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.postinstall rename to xCAT-server/share/xcat/netboot/sles/service.sles11.postinstall index 25c3d2fb0..69b45e027 100755 --- a/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.postinstall +++ b/xCAT-server/share/xcat/netboot/sles/service.sles11.postinstall @@ -33,8 +33,6 @@ END cat <>$installroot/etc/hosts -9.114.47.247 xcat_n02 -9.114.47.248 xcat_n03 END diff --git a/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.repolist b/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.repolist new file mode 100644 index 000000000..771b1f94b --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/service.sles11.ppc64.repolist @@ -0,0 +1,13 @@ +#-- +#-- This file contains list of custom repositories (directory with rpms). +#-- Repositories will be added to the image before package installation. +#-- This makes possible to automatically install (by defining in {profile}.pkglist) +#-- packages that are not contained in standard distribution repository +#-- +#-- File format: +#Type|URL|name +#-- example: +#Plaindir|file:/install/sles10sp2/x86_64/custom|custom +rpm-md|http://xcat.sourceforge.net/yum/xcat-dep/sles11/ppc64|xcat-dep +rpm-md|http://xcat.sourceforge.net/yum/devel/core-snap|core-snap +plaindir|file:///install/post/otherpkgs/sles11/ppc64|otherpkgs