mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-24 21:31:11 +00:00
Merge branch '2.9' of ssh://git.code.sf.net/p/xcat/xcat-core into 2.9
This commit is contained in:
@@ -56,6 +56,10 @@ B<renergy> I<noderange> [-V] { savingstatus={on | off}
|
||||
| dsavingstatus={on-norm | on-maxp | off}
|
||||
| fsavingstatus={on | off} | ffovalue=MHZ }
|
||||
|
||||
I<NOTE:> The setting operation for B<Power 8> server is only supported
|
||||
for the server which is running in PowerVM mode. Do NOT run the setting
|
||||
for the server which is running in OPAL mode.
|
||||
|
||||
=back
|
||||
|
||||
B<BladeCenter specific :>
|
||||
|
@@ -86,8 +86,6 @@ Reboot the service processor. If there are primary and secondary FSPs/BPAs of on
|
||||
|
||||
Attempt to request clean shutdown of OS (may not detect failures in completing command)
|
||||
|
||||
For stateless osimage, the 'acpid' package needs to be added to the .pkglist configuration file for the stateless osimage to enable the 'softoff' function.
|
||||
|
||||
=item B<off>
|
||||
|
||||
Turn power off.
|
||||
|
@@ -212,6 +212,14 @@ sub copycd
|
||||
#this plugin needs $path...
|
||||
return;
|
||||
}
|
||||
if ( $distname
|
||||
and $distname !~ /^debian/i
|
||||
and $distname !~ /^ubuntu/i)
|
||||
{
|
||||
|
||||
#If they say to call it something unidentifiable, give up?
|
||||
return;
|
||||
}
|
||||
|
||||
if ( $copypath || $noosimage || $nonoverwrite ){
|
||||
$callback->({info=> ["copycd on debian/ubuntu doesn't support -p, -o, -w options!"]});
|
||||
@@ -253,7 +261,9 @@ sub copycd
|
||||
# So that we have the netboot images
|
||||
$isnetinst = 1 if ($line2[7] eq "NETINST");
|
||||
|
||||
$distname="debian".$ver;
|
||||
if (!$distname) {
|
||||
$distname="debian".$ver;
|
||||
}
|
||||
$detdistname="debian".$ver;
|
||||
}
|
||||
elsif ($prod eq "Ubuntu" or $prod eq "Ubuntu-Server" )
|
||||
@@ -261,7 +271,9 @@ sub copycd
|
||||
# to cover for LTS releases
|
||||
$darch = $line2[7] if ($line2[2] eq "LTS");
|
||||
|
||||
$distname="ubuntu".$ver;
|
||||
if (!$distname) {
|
||||
$distname="ubuntu".$ver;
|
||||
}
|
||||
$detdistname="ubuntu".$ver;
|
||||
$discno = `cat $path/README.diskdefines | grep 'DISKNUM ' | awk '{print \$3}'`;
|
||||
}
|
||||
@@ -711,6 +723,12 @@ sub mkinstall
|
||||
my $initrdpath;
|
||||
my $maxmem;
|
||||
|
||||
# only first value is adopted, please see tabdump linuximage, section pkgdir.
|
||||
my @pkgdirs = split(/,/, $pkgdir);
|
||||
if (scalar(@pkgdirs) > 1) {
|
||||
$pkgdir = @pkgdirs[0];
|
||||
}
|
||||
|
||||
if (
|
||||
(
|
||||
($arch =~ /x86/ and
|
||||
|
@@ -170,6 +170,13 @@ sub process_request {
|
||||
$pkglist = $ref_linuximage_tab->{'pkglist'};
|
||||
|
||||
$srcdir = $ref_linuximage_tab->{'pkgdir'};
|
||||
my @pkgarray = split(/,/, $ref_linuximage_tab->{'pkgdir'});
|
||||
if(scalar(@pkgarray) > 1)
|
||||
{
|
||||
$srcdir = @pkgarray[0];
|
||||
}
|
||||
|
||||
|
||||
$srcdir_otherpkgs = $ref_linuximage_tab->{'otherpkgdir'};
|
||||
$otherpkglist = $ref_linuximage_tab->{'otherpkglist'};
|
||||
$postinstall_filename = $ref_linuximage_tab->{'postinstall'};
|
||||
|
@@ -1710,7 +1710,7 @@ sub copycd
|
||||
my $prod = <$mfile>;
|
||||
close($mfile);
|
||||
|
||||
if ($prod =~ m/SUSE-Linux-Enterprise-Server/ || $prod =~ m/SUSE-Linux-Enterprise-Software-Development-Kit/ || $prod =~ m/SLES/)
|
||||
if ($prod =~ m/SUSE-Linux-Enterprise-Server/ || $prod =~ m/SUSE-Linux-Enterprise-Software-Development-Kit/ || $prod =~ m/SLES/ || $prod =~ m/SDK/ )
|
||||
{
|
||||
if (-f "$mntpath/content") {
|
||||
my $content;
|
||||
@@ -1724,9 +1724,13 @@ sub copycd
|
||||
unless ($distname) { $distname = $detdistname; }
|
||||
}
|
||||
unless ($distname) {
|
||||
if (/^DISTRO/) {
|
||||
$_ =~ /sles:(\d+),/;
|
||||
$distname = "sles".$1;
|
||||
if (/^DISTRO/ || /^LABEL/) {
|
||||
# only set to $1 if the regex was successful
|
||||
if ($_ =~ /sles:(\d+),/) {
|
||||
$distname = "sles".$1;
|
||||
} elsif ($_ =~ /Software Development Kit\s*(\d+)/) {
|
||||
$distname = "sles".$1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1736,8 +1740,15 @@ sub copycd
|
||||
$detdistname = "sles" . $subparts[0];
|
||||
unless ($distname) { $distname = "sles" . $subparts[0] };
|
||||
}
|
||||
if($prod =~ m/Software-Development-Kit/) {
|
||||
if ($distname eq 'sles11.3') {
|
||||
if($prod =~ m/Software-Development-Kit/ || $prod =~ m/SDK/ ) {
|
||||
#
|
||||
# It's been seen that the 3rd disc on the SDK ISO images are using 'media.1' instead of
|
||||
# media.3 to represent the 3rd disc. This code here is to work around this issue. I'm not
|
||||
# sure why this only applies to sles 11.3 since I do see the same issue in sles 11. But will
|
||||
# keep the logic as is... checking for >= 11.3
|
||||
#
|
||||
(my $numver = $distname) =~ s/[^0-9]//g;
|
||||
if ($numver >= 11.3 ) {
|
||||
if ($discnumber == 1 and $totaldiscnumber == 1) { #disc 3, aka disc1 of 'debug'
|
||||
$discnumber = 3;
|
||||
}
|
||||
|
@@ -1,29 +1,29 @@
|
||||
aaa_base
|
||||
bash
|
||||
nfs-utils
|
||||
openssl
|
||||
dhcpcd
|
||||
kernel-default
|
||||
openssh
|
||||
procps
|
||||
psmisc
|
||||
wget
|
||||
vim
|
||||
sysconfig
|
||||
syslog-ng
|
||||
klogd
|
||||
dbus-1
|
||||
dbus-1-glib
|
||||
hal
|
||||
pam
|
||||
pam-modules
|
||||
rsync
|
||||
bc
|
||||
timezone
|
||||
iputils
|
||||
libzio
|
||||
s390-32
|
||||
s390-tools
|
||||
mdadm
|
||||
udev
|
||||
ntp
|
||||
aaa_base
|
||||
bash
|
||||
nfs-utils
|
||||
openssl
|
||||
dhcpcd
|
||||
kernel-default
|
||||
openssh
|
||||
procps
|
||||
psmisc
|
||||
wget
|
||||
vim
|
||||
sysconfig
|
||||
syslog-ng
|
||||
klogd
|
||||
dbus-1
|
||||
dbus-1-glib
|
||||
hal
|
||||
pam
|
||||
pam-modules
|
||||
rsync
|
||||
bc
|
||||
timezone
|
||||
iputils
|
||||
libzio
|
||||
s390-32
|
||||
s390-tools
|
||||
mdadm
|
||||
udev
|
||||
ntp
|
||||
|
@@ -0,0 +1,20 @@
|
||||
bash
|
||||
openssl
|
||||
kernel-default
|
||||
openssh
|
||||
psmisc
|
||||
wget
|
||||
sysconfig
|
||||
rsyslog
|
||||
vim
|
||||
rsync
|
||||
bc
|
||||
powerpc-utils
|
||||
timezone
|
||||
iputils
|
||||
lsvpd
|
||||
irqbalance
|
||||
procps
|
||||
ntp
|
||||
nfs-client
|
||||
dhcp-client
|
46
xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall
Executable file
46
xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/sh
|
||||
#-- Do not remove following line if you want to make use of CVS version tracking
|
||||
#-- $Id: compute.postinstall,v 1.21 2008/09/04 12:05:45 sikorsky Exp $
|
||||
#-- jurij.sikorsky@t-systems.cz
|
||||
#--
|
||||
#-- this script is run after all packages from $profile.pkglist are installed
|
||||
#--
|
||||
#-- it gets these arguments:
|
||||
#--
|
||||
#-- $1 = install root (chroot directory for profile)
|
||||
#-- $2 = OS version
|
||||
#-- $3 = architecture
|
||||
#-- $4 = profile name
|
||||
#-- $5 = work dir (where genimage is located)
|
||||
#--
|
||||
#--
|
||||
installroot=$1
|
||||
osver=$2
|
||||
arch=$3
|
||||
profile=$4
|
||||
workdir=$5
|
||||
|
||||
#-- Example how /etc/fstab can be automatically generated during image generation:
|
||||
cat <<END >$installroot/etc/fstab
|
||||
proc /proc proc rw 0 0
|
||||
sysfs /sys sysfs rw 0 0
|
||||
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
|
||||
${profile}_${arch} / tmpfs rw 0 1
|
||||
none /tmp tmpfs defaults,size=10m 0 2
|
||||
none /var/tmp tmpfs defaults,size=10m 0 2
|
||||
END
|
||||
|
||||
#-- Uncomment the line contains "cons" in /etc/inittab
|
||||
#cons:12345:respawn:/sbin/smart_agetty -L 38400 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.
|
||||
#cat /dev/null > $installroot/etc/IMGVERSION
|
||||
#for ext in pkglist exlist postinstall repolist; do
|
||||
# [ -r $workdir/$profile.$ext ] && cat $workdir/$profile.$ext | grep -E '^[[:space:]]*#.*[[:space:]]\$Id' >> $installroot/etc/IMGVERSION
|
||||
#done
|
||||
|
@@ -377,7 +377,7 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Fri Nov 20 2007 - Jarrod Johnson <jbjohnso@us.ibm.com>
|
||||
* Tue Nov 20 2007 - Jarrod Johnson <jbjohnso@us.ibm.com>
|
||||
- Changes for relocatible rpm.
|
||||
|
||||
* Wed May 2 2007 - Norm Nott <nott@us.ibm.com>
|
||||
|
@@ -585,7 +585,13 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do
|
||||
plain_pkgs_preremove=""
|
||||
plain_pkgs_postremove=""
|
||||
array_empty handled_path
|
||||
for x in `echo "$pkglist" | tr "," "\n"`
|
||||
oifs=$IFS
|
||||
IFS=$','
|
||||
pkgsarray=($pkglist)
|
||||
IFS=$oifs
|
||||
echo "pkgsarray: ${pkgsarray[@]}, ${#pkgsarray[@]}"
|
||||
echo "yum: $hasyum, apt: $hasapt, zypper: $haszypper"
|
||||
for x in ${pkgsarray[@]}
|
||||
do
|
||||
#check if the file name starts with -- or -.
|
||||
#If it is start with -, then the rpm must be removed before installing other packages
|
||||
@@ -621,8 +627,12 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do
|
||||
else
|
||||
fn=`basename $x`
|
||||
path=`dirname $x`
|
||||
whole_path=$OTHERPKGDIR/$path
|
||||
#whole_path=$OTHERPKGDIR
|
||||
whole_path=$OTHERPKGDIR
|
||||
|
||||
if [[ ! $OSVER =~ ^ubuntu|^debian ]]; then
|
||||
echo "rhel package path"
|
||||
whole_path=$OTHERPKGDIR/$path
|
||||
fi
|
||||
|
||||
#find out if this path has already handled
|
||||
try_repo=1
|
||||
@@ -690,6 +700,7 @@ while [ $op_index -le $OTHERPKGS_INDEX ]; do
|
||||
IFS=$OLDIFS
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ $hasyum -eq 1 ]; then
|
||||
#use yum
|
||||
result=`yum list $fn 2>&1`
|
||||
@@ -724,6 +735,7 @@ EOF`
|
||||
fi
|
||||
elif [ $hasapt -eq 1 ]; then
|
||||
#use apt
|
||||
fn=`echo $fn| tr "." ":"`
|
||||
apt_get_update_if_repos_changed $REPOFILE
|
||||
result=`apt-cache show $fn 2>&1`
|
||||
|
||||
@@ -735,8 +747,6 @@ EOF`
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $rc -eq 0 ]; then
|
||||
repo_pkgs="$repo_pkgs $fn"
|
||||
else
|
||||
@@ -909,8 +919,8 @@ EOF`
|
||||
|
||||
#Handle the rest with rpm
|
||||
if [ "$plain_pkgs" != "" -a -n "$OTHERPKGDIR" ]; then
|
||||
echo "Warning: the packages $plain_pkgs could not be found in the yum repository, falling back to rpm command. If you want your packages to be installed with yum, verify yum is installed and createrepo has been run."
|
||||
logger -p local4.info -t xcat "Warning: the packages $plain_pkgs could not be found in the yum repository, falling back to rpm command. If you want your packages to be installed with yum, verify yum is installed and createrepo has been run."
|
||||
echo "Warning: the packages $plain_pkgs could not be found in the yum/apt repository, falling back to rpm/dpkg command. If you want your packages to be installed with yum/apt, verify yum/apt is installed and createrepo/dpkg-scanpackages has been run."
|
||||
logger -p local4.info -t xcat "Warning: the packages $plain_pkgs could not be found in the yum/apt repository, falling back to rpm/dpkg command. If you want your packages to be installed with yum/apt, verify yum/apt is installed and createrepo/dpkg-scanpackages has been run."
|
||||
if [ $mounted -eq 0 ]; then
|
||||
dir_no_ftproot=${OTHERPKGDIR#*$INSTALLDIR/}
|
||||
mkdir -p /xcatpost/$dir_no_ftproot
|
||||
|
@@ -105,6 +105,9 @@ config_Rsyslog_C3()
|
||||
cat /tmp/sed.tmp >$2
|
||||
echo "*.debug /var/log/messages" >> $2
|
||||
touch /var/log/messages
|
||||
if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ) || ( pmatch $OSVER "debian*" ); then
|
||||
chown syslog:adm /var/log/messages
|
||||
fi
|
||||
else
|
||||
sed 's/^\(\*\..*\)/\#\1/' $2 >/tmp/sed.tmp
|
||||
cat /tmp/sed.tmp >$2
|
||||
@@ -149,6 +152,9 @@ config_rsyslog_V8()
|
||||
#logging is local, do not forward
|
||||
#making sure all the messages goes to /var/log/messages
|
||||
touch /var/log/messages
|
||||
if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ) || ( pmatch $OSVER "debian*" ); then
|
||||
chown syslog:adm /var/log/messages
|
||||
fi
|
||||
# backup rsyslog.conf
|
||||
if [ ! -f $conf_file.XCATORIG ]; then
|
||||
cp -f $conf_file $conf_file.XCATORIG
|
||||
@@ -318,6 +324,9 @@ else
|
||||
if [ $goLocal -eq 1 ]; then
|
||||
#making sure all the messages goes to /var/log/messages
|
||||
touch /var/log/messages
|
||||
if ( pmatch $OSVER "ubuntu*" ) || ( is_lsb_ubuntu ) || ( pmatch $OSVER "debian*" ); then
|
||||
chown syslog:adm /var/log/messages
|
||||
fi
|
||||
if [ $ng -eq 0 ]; then
|
||||
if [ ! -f $conf_file.XCATORIG ]; then
|
||||
cp -f $conf_file $conf_file.XCATORIG
|
||||
|
Reference in New Issue
Block a user