diff --git a/xCAT-client/pods/man1/renergy.1.pod b/xCAT-client/pods/man1/renergy.1.pod index c036e9148..d6212dec5 100644 --- a/xCAT-client/pods/man1/renergy.1.pod +++ b/xCAT-client/pods/man1/renergy.1.pod @@ -56,6 +56,10 @@ B I [-V] { savingstatus={on | off} | dsavingstatus={on-norm | on-maxp | off} | fsavingstatus={on | off} | ffovalue=MHZ } +I The setting operation for B 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 diff --git a/xCAT-client/pods/man1/rpower.1.pod b/xCAT-client/pods/man1/rpower.1.pod index 2d38bf250..f4606a599 100644 --- a/xCAT-client/pods/man1/rpower.1.pod +++ b/xCAT-client/pods/man1/rpower.1.pod @@ -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 Turn power off. diff --git a/xCAT-server/lib/xcat/plugins/debian.pm b/xCAT-server/lib/xcat/plugins/debian.pm index 13f54eea8..0fc849329 100755 --- a/xCAT-server/lib/xcat/plugins/debian.pm +++ b/xCAT-server/lib/xcat/plugins/debian.pm @@ -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 diff --git a/xCAT-server/lib/xcat/plugins/genimage.pm b/xCAT-server/lib/xcat/plugins/genimage.pm index 5e66879d2..fc54f0619 100644 --- a/xCAT-server/lib/xcat/plugins/genimage.pm +++ b/xCAT-server/lib/xcat/plugins/genimage.pm @@ -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'}; diff --git a/xCAT-server/lib/xcat/plugins/sles.pm b/xCAT-server/lib/xcat/plugins/sles.pm index 66adcc982..d61d52e42 100755 --- a/xCAT-server/lib/xcat/plugins/sles.pm +++ b/xCAT-server/lib/xcat/plugins/sles.pm @@ -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; } diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sles11.s390x.pkglist b/xCAT-server/share/xcat/netboot/sles/compute.sles11.s390x.pkglist index d626927e4..d21a59702 100644 --- a/xCAT-server/share/xcat/netboot/sles/compute.sles11.s390x.pkglist +++ b/xCAT-server/share/xcat/netboot/sles/compute.sles11.s390x.pkglist @@ -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 diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.pkglist b/xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.pkglist new file mode 100644 index 000000000..e3475fcd0 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.pkglist @@ -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 diff --git a/xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall b/xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall new file mode 100755 index 000000000..c75134560 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/sles/compute.sles12.ppc64le.postinstall @@ -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 <$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 + diff --git a/xCAT-server/xCAT-server.spec b/xCAT-server/xCAT-server.spec index 17bc22eab..e8833c8c0 100644 --- a/xCAT-server/xCAT-server.spec +++ b/xCAT-server/xCAT-server.spec @@ -377,7 +377,7 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog -* Fri Nov 20 2007 - Jarrod Johnson +* Tue Nov 20 2007 - Jarrod Johnson - Changes for relocatible rpm. * Wed May 2 2007 - Norm Nott diff --git a/xCAT/postscripts/otherpkgs b/xCAT/postscripts/otherpkgs index 578c284e4..c70af8d65 100755 --- a/xCAT/postscripts/otherpkgs +++ b/xCAT/postscripts/otherpkgs @@ -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 diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog index a588b82d3..7bf9c068f 100755 --- a/xCAT/postscripts/syslog +++ b/xCAT/postscripts/syslog @@ -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