diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sles10.ppc64.postinstall b/xCAT-server/share/xcat/netboot/sles/compute.sles10.ppc64.postinstall index bc50c8b68..9565c4624 100644 --- a/xCAT-server/share/xcat/netboot/sles/compute.sles10.ppc64.postinstall +++ b/xCAT-server/share/xcat/netboot/sles/compute.sles10.ppc64.postinstall @@ -31,6 +31,11 @@ none /tmp tmpfs defaults,size=10m 0 2 none /var/tmp tmpfs defaults,size=10m 0 2 END +#-- Setup the console +TMP_inittab=`sed 's/\(#\)\(cons:12345.*\)$/\2/' $installroot/etc/inittab` +echo "$TMP_inittab" > $installroot/etc/inittab + + #-- Example of booted image versioning #-- We want to know, with what configuration (version of the image) each node was booted. #-- Hence, we keep image definition files and postscripts in CVS. During image generation we create file /etc/IMGVERSION and fill it with CVS "$Id$" of files with image definition (.pkglist, .exlist, .repolist, .postinstall). Then, during boot, each "CVS enabled" postscript (see /install/postscripts/cvs_template.sh and /install/postscripts/cvs_template.pl) adds one line to /etc/IMGVERSION. Then you can determine in any time what image you are running and what postscipts in which versions were run. diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index e251083bd..3fac1a58c 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -144,7 +144,7 @@ if (@ARGV > 0) { } if (!$arch) { - my $arch = `uname -m`; + $arch = `uname -m`; chomp($arch); if ($arch =~ /i.86$/) { $arch = "x86"; @@ -918,12 +918,19 @@ sub include_file sub get_extra_pkglist_file_name { my $base=shift; + my $dotpos = rindex($osver, "."); + my $osbase = substr($osver, 0, $dotpos); + if (-r "$base/$profile.$osver.$arch.otherpkgs.pkglist") { return "$base/$profile.$osver.$arch.otherpkgs.pkglist"; + } elsif (-r "$base/$profile.$osbase.$arch.otherpkgs.pkglist") { + return "$base/$profile.$osbase.$arch.otherpkgs.pkglist"; } elsif (-r "$base/$profile.$arch.otherpkgs.pkglist") { return "$base/$profile.$arch.otherpkgs.pkglist"; } elsif (-r "$base/$profile.$osver.otherpkgs.pkglist") { return "$base/$profile.$osver.otherpkgs.pkglist"; + } elsif (-r "$base/$profile.$osbase.otherpkgs.pkglist") { + return "$base/$profile.$osbase.otherpkgs.pkglist"; } elsif (-r "$base/$profile.otherpkgs.pkglist") { return "$base/$profile.otherpkgs.pkglist"; } @@ -932,12 +939,18 @@ sub get_extra_pkglist_file_name { sub get_pkglist_file_name { my $base=shift; + my $dotpos = rindex($osver, "."); + my $osbase = substr($osver, 0, $dotpos); if (-r "$base/$profile.$osver.$arch.pkglist") { return "$base/$profile.$osver.$arch.pkglist"; + } elsif (-r "$base/$profile.$osbase.$arch.pkglist") { + return "$base/$profile.$osbase.$arch.pkglist"; } elsif (-r "$base/$profile.$arch.pkglist") { return "$base/$profile.$arch.pkglist"; } elsif (-r "$base/$profile.$osver.pkglist") { return "$base/$profile.$osver.pkglist"; + } elsif (-r "$base/$profile.$osbase.pkglist") { + return "$base/$profile.$osbase.pkglist"; } elsif (-r "$base/$profile.pkglist") { return "$base/$profile.pkglist"; } @@ -948,12 +961,18 @@ sub get_pkglist_file_name { sub get_postinstall_file_name { my $base=shift; + my $dotpos = rindex($osver, "."); + my $osbase = substr($osver, 0, $dotpos); if (-x "$base/$profile.$osver.$arch.postinstall") { return "$base/$profile.$osver.$arch.postinstall"; + } elsif (-x "$base/$profile.$osbase.$arch.postinstall") { + return "$base/$profile.$osbase.$arch.postinstall"; } elsif (-x "$base/$profile.$arch.postinstall") { return "$base/$profile.$arch.postinstall"; } elsif (-x "$base/$profile.$osver.postinstall") { return "$base/$profile.$osver.postinstall"; + } elsif (-x "$base/$profile.$osbase.postinstall") { + return "$base/$profile.$osbase.postinstall"; } elsif (-x "$base/$profile.postinstall") { return "$base/$profile.postinstall"; } diff --git a/xCAT-server/share/xcat/netboot/suse/genimage b/xCAT-server/share/xcat/netboot/suse/genimage index 55befefff..b1df60742 100755 --- a/xCAT-server/share/xcat/netboot/suse/genimage +++ b/xCAT-server/share/xcat/netboot/suse/genimage @@ -144,7 +144,7 @@ if (@ARGV > 0) { } if (!$arch) { - my $arch = `uname -m`; + $arch = `uname -m`; chomp($arch); if ($arch =~ /i.86$/) { $arch = "x86";