mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-07-21 08:37:27 +00:00
Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@
|
||||
# LOG=<filename> - provide an LOG file option to redirect some output into log file
|
||||
|
||||
# you can change this if you need to
|
||||
UPLOADUSER=bp-sawyers
|
||||
UPLOADUSER=litingt
|
||||
FRS=/home/frs/project/x/xc/xcat
|
||||
|
||||
# These are the rpms that should be built for each kind of xcat build
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@
|
||||
# VERBOSE=1 - to see lots of verbose output
|
||||
|
||||
# you can change this if you need to
|
||||
UPLOADUSER=bp-sawyers
|
||||
UPLOADUSER=litingt
|
||||
|
||||
FRS=/home/frs/project/x/xc/xcat
|
||||
OSNAME=$(uname)
|
||||
|
||||
@@ -326,7 +326,7 @@ bootparams => {
|
||||
'kernel' => 'The kernel that network boot actions should currently acquire and use. Note this could be a chained boot loader such as memdisk or a non-linux boot loader',
|
||||
'initrd' => 'The initial ramdisk image that network boot actions should use (could be a DOS floppy or hard drive image if using memdisk as kernel)',
|
||||
'kcmdline' => 'Arguments to be passed to the kernel',
|
||||
'addkcmdline' => 'User specified one or more parameters to be passed to the kernel',
|
||||
'addkcmdline' => 'User specified one or more parameters to be passed to the kernel. For the kernel options need to be persistent after installation, specify them with prefix "R::"',
|
||||
'dhcpstatements' => 'xCAT manipulated custom dhcp statements (not intended for user manipulation)',
|
||||
'adddhcpstatements' => 'Custom dhcp statements for administrator use (not implemneted yet)',
|
||||
comments => 'Any user-written notes.',
|
||||
@@ -754,7 +754,7 @@ linuximage => {
|
||||
imagename => 'The name of this xCAT OS image definition.',
|
||||
template => 'The fully qualified name of the template file that will be used to create the OS installer configuration file for stateful installations (e.g. kickstart for RedHat, autoyast for SLES).',
|
||||
boottarget => 'The name of the boottarget definition. When this attribute is set, xCAT will use the kernel, initrd and kernel params defined in the boottarget definition instead of the default.',
|
||||
addkcmdline=> 'User specified arguments to be passed to the kernel. The user arguments are appended to xCAT.s default kernel arguments. This attribute is ignored if linuximage.boottarget is set.',
|
||||
addkcmdline=> 'User specified arguments to be passed to the kernel. The user arguments are appended to xCAT.s default kernel arguments. For the kernel options need to be persistent after installation, specify them with prefix "R::". This attribute is ignored if linuximage.boottarget is set.',
|
||||
pkglist => 'The fully qualified name of the file that stores the distro packages list that will be included in the image. Make sure that if the pkgs in the pkglist have dependency pkgs, the dependency pkgs should be found in one of the pkgdir',
|
||||
pkgdir => 'The name of the directory where the distro packages are stored. It could be set multiple paths.The multiple paths must be seperated by ",". The first path in the value of osimage.pkgdir must be the OS base pkg dir path, such as pkgdir=/install/rhels6.2/x86_64,/install/updates . In the os base pkg path, there are default repository data. And in the other pkg path(s), the users should make sure there are repository data. If not, use "createrepo" command to create them. For ubuntu, multiple mirrors can be specified in the pkgdir attribute, the mirrors must be prefixed by the protocol(http/ssh) and delimited with "," between each other.',
|
||||
otherpkglist => 'The fully qualified name of the file that stores non-distro package lists that will be included in the image. It could be set multiple paths.The multiple paths must be seperated by ",".',
|
||||
|
||||
@@ -4505,5 +4505,32 @@ sub parseMacTabEntry{
|
||||
return $mac_ret;
|
||||
}
|
||||
|
||||
#The splitkcmdline subroutine is used to split the "persistent kernel options"
|
||||
#and "provision-time kernel options" out of the kernel cmdline string
|
||||
#Arguments:
|
||||
# $kcmdline: the native kernel cmdline string
|
||||
#Return value:
|
||||
# a reference of hash with the following KEY-VALUE def:
|
||||
# "persistent" ==> string of persistent kernel options,delimited with space " "
|
||||
# "volatile" ==> string of provision-time kernel options,delimited with space " "
|
||||
sub splitkcmdline{
|
||||
my $kcmdline=shift;
|
||||
if( $kcmdline =~ /xCAT::Utils/) {
|
||||
$kcmdline=shift;
|
||||
}
|
||||
|
||||
my %cmdhash;
|
||||
|
||||
my @cmdlist=split(/[, ]/,$kcmdline);
|
||||
foreach my $cmd (@cmdlist){
|
||||
if($cmd =~ /^R::(.*)$/){
|
||||
$cmdhash{persistent}.="$1 ";
|
||||
}else{
|
||||
$cmdhash{volatile}.="$cmd ";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return \%cmdhash;
|
||||
}
|
||||
1;
|
||||
|
||||
@@ -129,7 +129,7 @@ if [ "$HOSTOS" = "mcp" ]; then
|
||||
cp /boot/vmlinuz-* /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/kernel
|
||||
else
|
||||
echo Adding kernel /boot/vmlinuz-$BUILDARCH ...
|
||||
cp /boot/vmlinuz-$BUILDARCH /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/kernel
|
||||
cp /boot/vmlinuz-`uname -r` /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/kernel
|
||||
fi
|
||||
cd -
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ dracut_install mkswap df brctl vconfig ifenslave ssh-keygen scp clear dhclient l
|
||||
dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2
|
||||
dracut_install poweroff ntpq ntpd hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services
|
||||
dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc
|
||||
dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail /usr/bin/basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
|
||||
dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
|
||||
dracut_install dmidecode /usr/lib64/libstdc++.so.6 #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si
|
||||
dracut_install dmidecode /usr/lib64/libstdc++.so.5 #broadcom firmware update links against old lib
|
||||
dracut_install /lib/libpthread.so.0 #32 bit lib because UXSPI will not ship a native 64 bit build
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
instmods nfs sunrpc
|
||||
instmods e1000 e1000e virtio_net igb ines sfc mlx4_en cxgb3 cxgb4 tg3 bnx2 bnx2x bna ixgb ixgbe qlge mptsas mpt2sas mpt3sas ata_piix megaraid_sas virtio_blk ahci ibmaem xhci-hcd sd_mod pmcraid be2net vfat ext3 ext4 btrfs reiserfs usb_storage scsi_wait_scan kvm kvm-intel kvm-amd ipmi_si ipmi_devintf qlcnic xfs
|
||||
instmods e1000 e1000e virtio_net virtio_pci igb ines sfc mlx4_en cxgb3 cxgb4 tg3 bnx2 bnx2x bna ixgb ixgbe qlge mptsas mpt2sas mpt3sas ata_piix megaraid_sas virtio_blk ahci ibmaem xhci-hcd sd_mod pmcraid be2net vfat ext3 ext4 btrfs reiserfs usb_storage scsi_wait_scan kvm kvm-intel kvm-amd ipmi_si ipmi_devintf qlcnic xfs
|
||||
instmods macvlan macvtap 8021q bridge bonding vmxnet3 cpufreq_ondemand acpi-cpufreq powernow-k8 cdc_ether
|
||||
instmods mptctl #LSI firmware management requires this
|
||||
instmods mlx4_ib ib_umad #make the mellanox ib available enough to examine /sys
|
||||
@@ -9,3 +9,4 @@ instmods ibmveth # ppc64 virtual ethernet
|
||||
instmods ibmvscsi # ppc64 virtual disk
|
||||
instmods ehea # ppc64 hea ethernet
|
||||
instmods dm-mod #support LVM for sysclone
|
||||
instmods sg # Lenovo thinkserver firmware update support
|
||||
|
||||
@@ -104,7 +104,7 @@ sub subvars {
|
||||
$ENV{NODESTATUS}=$tmp;
|
||||
}
|
||||
|
||||
|
||||
$ENV{PERSKCMDLINE}=getPersistentKcmdline($node);
|
||||
|
||||
#replace the env with the right value so that correct include files can be found
|
||||
$inc =~ s/#ENV:([^#]+)#/envvar($1)/eg;
|
||||
@@ -250,6 +250,7 @@ sub subvars {
|
||||
$inc =~ s/#KICKSTARTNET#/kickstartnetwork()/eg;
|
||||
$inc =~ s/#MIRRORSPEC#/mirrorspec()/eg;
|
||||
$inc =~ s/#YAST2NET#/yast2network()/eg;
|
||||
$inc =~ s/#KICKSTARTBOOTLOADER#/kickstartbootloader()/eg;
|
||||
$inc =~ s/#ESXIPV6SETUP#/esxipv6setup()/eg;
|
||||
$inc =~ s/#WINTIMEZONE#/xCAT::TZUtils::get_wintimezone()/eg;
|
||||
$inc =~ s/#WINPRODKEY:([^#]+)#/get_win_prodkey($1)/eg;
|
||||
@@ -662,6 +663,66 @@ sub get_node_domain {
|
||||
|
||||
}
|
||||
|
||||
|
||||
#get persistent command options from node and osimage definition
|
||||
sub getPersistentKcmdline {
|
||||
my $lcnode=shift;
|
||||
if ( $lcnode eq 'THISNODE' ){
|
||||
$lcnode=$node;
|
||||
}
|
||||
|
||||
my @nodes=($lcnode);
|
||||
|
||||
my $bptab=xCAT::Table->new('bootparams',-create=>1);
|
||||
my $bphash = $bptab->getNodesAttribs(\@nodes,['addkcmdline']);
|
||||
|
||||
my $typetab=xCAT::Table->new('nodetype',-create=>1);
|
||||
my $typehash=$typetab->getNodesAttribs(\@nodes,['provmethod']);
|
||||
my $linuximgtab=xCAT::Table->new('linuximage',-create=>1);
|
||||
|
||||
my $ent = $typehash->{$lcnode}->[0];
|
||||
my $osimgname = $ent->{'provmethod'};
|
||||
|
||||
my $linuximghash = $linuximgtab->getAttribs({imagename => $osimgname}, 'boottarget', 'addkcmdline');
|
||||
my $kern = $bphash->{$lcnode}->[0];
|
||||
|
||||
my $addkcmdline;
|
||||
if ($kern->{addkcmdline}) {
|
||||
$addkcmdline .= $kern->{addkcmdline}." ";
|
||||
}
|
||||
|
||||
if($linuximghash and $linuximghash->{'addkcmdline'})
|
||||
{
|
||||
unless($linuximghash->{'boottarget'})
|
||||
{
|
||||
$addkcmdline .= $linuximghash->{'addkcmdline'}." ";
|
||||
}
|
||||
}
|
||||
|
||||
my $cmdhashref;
|
||||
if($addkcmdline){
|
||||
$cmdhashref=xCAT::Utils->splitkcmdline($addkcmdline);
|
||||
}
|
||||
|
||||
my $ret="";
|
||||
if($cmdhashref and $cmdhashref->{persistent})
|
||||
{
|
||||
$ret=$cmdhashref->{persistent};
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
sub kickstartbootloader {
|
||||
my $line="bootloader";
|
||||
if($ENV{PERSKCMDLINE}){
|
||||
$line.=" --append=\"".$ENV{PERSKCMDLINE}."\"";
|
||||
}
|
||||
return $line;
|
||||
}
|
||||
|
||||
|
||||
sub esxipv6setup {
|
||||
if (not $::XCATSITEVALS{managedaddressmode} or $::XCATSITEVALS{managedaddressmode} =~ /v4/) { return ""; } # blank line for ipv4 schemes
|
||||
my $v6addr;
|
||||
|
||||
@@ -795,8 +795,15 @@ sub mknetboot
|
||||
);
|
||||
next;
|
||||
}
|
||||
$kcmdline .=
|
||||
" console=tty0 console=ttyS" . $sent->{serialport} . "," . $sent->{serialspeed};
|
||||
if ( $arch =~ /ppc64/i ) {
|
||||
# For IBM Power machines, either ppc64 or ppc64le (ppc64el),
|
||||
# both the physical serial port or virtual serial port appeared
|
||||
# in PowerVM LPAR or PowerKVM guest use device /dev/hvc0 or
|
||||
# /dev/hvc1 instead of /dev/ttyS0 or /dev/ttyS1
|
||||
$kcmdline .= " console=tty0 console=hvc" . $sent->{serialport} . "," . $sent->{serialspeed};
|
||||
} else {
|
||||
$kcmdline .= " console=tty0 console=ttyS" . $sent->{serialport} . "," . $sent->{serialspeed};
|
||||
}
|
||||
if ($sent->{serialflow} =~ /(hard|tcs|ctsrts)/)
|
||||
{
|
||||
$kcmdline .= "n8r";
|
||||
|
||||
@@ -132,17 +132,29 @@ sub setstate {
|
||||
$kern->{kcmdline} =~ s/!myipfn!/$ipfn/g;
|
||||
}
|
||||
}
|
||||
|
||||
my $addkcmdline;
|
||||
if ($kern->{addkcmdline}) {
|
||||
$kern->{kcmdline} .= " ".$kern->{addkcmdline};
|
||||
$addkcmdline .= $kern->{addkcmdline}." ";
|
||||
}
|
||||
|
||||
if($linuximghash and $linuximghash->{'addkcmdline'})
|
||||
{
|
||||
unless($linuximghash->{'boottarget'})
|
||||
{
|
||||
$kern->{kcmdline} .= " ".$linuximghash->{'addkcmdline'};
|
||||
$addkcmdline .= $linuximghash->{'addkcmdline'}." ";
|
||||
}
|
||||
}
|
||||
|
||||
my $cmdhashref;
|
||||
if($addkcmdline){
|
||||
$cmdhashref=xCAT::Utils->splitkcmdline($addkcmdline);
|
||||
}
|
||||
|
||||
if($cmdhashref and $cmdhashref->{volatile})
|
||||
{
|
||||
$kern->{kcmdline}.=" ".$cmdhashref->{volatile};
|
||||
}
|
||||
|
||||
my $pcfg;
|
||||
unless (-d "$tftpdir/boot/grub2") {
|
||||
|
||||
@@ -108,6 +108,16 @@ sub setstate {
|
||||
|
||||
my $kcmdlinehack = ($imgaddkcmdline)?$kern->{addkcmdline}." ".$imgaddkcmdline : $kern->{addkcmdline};
|
||||
|
||||
my $cmdhashref;
|
||||
if($kcmdlinehack){
|
||||
$cmdhashref=xCAT::Utils->splitkcmdline($kcmdlinehack);
|
||||
}
|
||||
|
||||
if($cmdhashref and $cmdhashref->{volatile})
|
||||
{
|
||||
$kcmdlinehack=$cmdhashref->{volatile};
|
||||
}
|
||||
|
||||
|
||||
while ($kcmdlinehack =~ /#NODEATTRIB:([^:#]+):([^:#]+)#/) {
|
||||
my $natab = xCAT::Table->new($1);
|
||||
|
||||
@@ -119,6 +119,17 @@ sub setstate {
|
||||
|
||||
my $kcmdlinehack = ($imgaddkcmdline)?$kern->{addkcmdline}." ".$imgaddkcmdline : $kern->{addkcmdline};
|
||||
|
||||
my $cmdhashref;
|
||||
if($kcmdlinehack){
|
||||
$cmdhashref=xCAT::Utils->splitkcmdline($kcmdlinehack);
|
||||
}
|
||||
|
||||
if($cmdhashref and $cmdhashref->{volatile})
|
||||
{
|
||||
$kcmdlinehack=$cmdhashref->{volatile};
|
||||
}
|
||||
|
||||
|
||||
while ($kcmdlinehack =~ /#NODEATTRIB:([^:#]+):([^:#]+)#/) {
|
||||
my $natab = xCAT::Table->new($1);
|
||||
my $naent = $natab->getNodeAttribs($node,[$2]);
|
||||
|
||||
@@ -127,18 +127,32 @@ sub setstate {
|
||||
$kern->{kcmdline} =~ s/!myipfn!/$ipfn/g;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
my $addkcmdline;
|
||||
if ($kern->{addkcmdline}) {
|
||||
$kern->{kcmdline} .= " ".$kern->{addkcmdline};
|
||||
$addkcmdline .= $kern->{addkcmdline}." ";
|
||||
}
|
||||
|
||||
|
||||
if($linuximghash and $linuximghash->{'addkcmdline'})
|
||||
{
|
||||
unless($linuximghash->{'boottarget'})
|
||||
unless($linuximghash->{'boottarget'})
|
||||
{
|
||||
$kern->{kcmdline} .= " ".$linuximghash->{'addkcmdline'};
|
||||
}
|
||||
$addkcmdline .= $linuximghash->{'addkcmdline'}." ";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
my $cmdhashref;
|
||||
if($addkcmdline){
|
||||
$cmdhashref=xCAT::Utils->splitkcmdline($addkcmdline);
|
||||
}
|
||||
|
||||
if($cmdhashref and $cmdhashref->{volatile})
|
||||
{
|
||||
$kern->{kcmdline}.=" ".$cmdhashref->{volatile};
|
||||
}
|
||||
|
||||
|
||||
my $pcfg;
|
||||
unless (-d "$tftpdir/etc") {
|
||||
|
||||
@@ -75,7 +75,7 @@ key --skip
|
||||
# --useLilo
|
||||
# --md5pass <crypted MD5 password for GRUB>
|
||||
#
|
||||
bootloader
|
||||
#KICKSTARTBOOTLOADER#
|
||||
|
||||
#
|
||||
# install or upgrade
|
||||
|
||||
@@ -76,7 +76,8 @@ clearpart --all --initlabel
|
||||
# --useLilo
|
||||
# --md5pass <crypted MD5 password for GRUB>
|
||||
#
|
||||
bootloader
|
||||
#KICKSTARTBOOTLOADER#
|
||||
|
||||
|
||||
#
|
||||
# install or upgrade
|
||||
|
||||
@@ -78,8 +78,7 @@ part / --size 1 --grow --fstype ext4 --ondisk sda
|
||||
# --useLilo
|
||||
# --md5pass <crypted MD5 password for GRUB>
|
||||
#
|
||||
bootloader
|
||||
|
||||
#KICKSTARTBOOTLOADER#
|
||||
#
|
||||
# install or upgrade
|
||||
#
|
||||
|
||||
@@ -74,8 +74,7 @@ key --skip
|
||||
# --useLilo
|
||||
# --md5pass <crypted MD5 password for GRUB>
|
||||
#
|
||||
bootloader
|
||||
|
||||
#KICKSTARTBOOTLOADER#
|
||||
#
|
||||
# install or upgrade
|
||||
#
|
||||
|
||||
@@ -76,8 +76,7 @@ clearpart --all --initlabel
|
||||
# --useLilo
|
||||
# --md5pass <crypted MD5 password for GRUB>
|
||||
#
|
||||
bootloader
|
||||
|
||||
#KICKSTARTBOOTLOADER#
|
||||
#
|
||||
# install or upgrade
|
||||
#
|
||||
|
||||
@@ -218,6 +218,12 @@ if [ -z "$instdisk" ]; then
|
||||
instdisk=$firstdisk
|
||||
fi
|
||||
fi
|
||||
|
||||
# Could not determine the install disk for whatever reason,
|
||||
# try the default /dev/sda
|
||||
if [ -z "$instdisk" ]; then
|
||||
instdisk="/dev/sda"
|
||||
fi
|
||||
|
||||
|
||||
modprobe ext4 >& /dev/null
|
||||
|
||||
@@ -182,6 +182,12 @@ if [ -z "$instdisk" ]; then
|
||||
instdisk=$firstdisk
|
||||
fi
|
||||
fi
|
||||
# Could not determine the install disk for whatever reason,
|
||||
# try the default /dev/sda
|
||||
if [ -z "$instdisk" ]; then
|
||||
instdisk="/dev/sda"
|
||||
fi
|
||||
|
||||
modprobe ext4 >& /dev/null
|
||||
modprobe ext4dev >& /dev/null
|
||||
if grep ext4dev /proc/filesystems > /dev/null; then
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<bootloader>
|
||||
<write_bootloader config:type="boolean">true</write_bootloader>
|
||||
<activate config:type="boolean">true</activate>
|
||||
<kernel_parameters></kernel_parameters>
|
||||
<kernel_parameters>#XCATVAR:PERSKCMDLINE#</kernel_parameters>
|
||||
<lba_support config:type="boolean">false</lba_support>
|
||||
<linear config:type="boolean">false</linear>
|
||||
<location>mbr</location>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<bootloader>
|
||||
<write_bootloader config:type="boolean">true</write_bootloader>
|
||||
<activate config:type="boolean">true</activate>
|
||||
<kernel_parameters></kernel_parameters>
|
||||
<kernel_parameters>#XCATVAR:PERSKCMDLINE#</kernel_parameters>
|
||||
<lba_support config:type="boolean">false</lba_support>
|
||||
<linear config:type="boolean">false</linear>
|
||||
<location>mbr</location>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<bootloader>
|
||||
<write_bootloader config:type="boolean">true</write_bootloader>
|
||||
<activate config:type="boolean">true</activate>
|
||||
<kernel_parameters></kernel_parameters>
|
||||
<kernel_parameters>#XCATVAR:PERSKCMDLINE#</kernel_parameters>
|
||||
<lba_support config:type="boolean">false</lba_support>
|
||||
<linear config:type="boolean">false</linear>
|
||||
<location>mbr</location>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<bootloader>
|
||||
<write_bootloader config:type="boolean">true</write_bootloader>
|
||||
<activate config:type="boolean">true</activate>
|
||||
<kernel_parameters></kernel_parameters>
|
||||
<kernel_parameters>#XCATVAR:PERSKCMDLINE#</kernel_parameters>
|
||||
<lba_support config:type="boolean">false</lba_support>
|
||||
<linear config:type="boolean">false</linear>
|
||||
<location>mbr</location>
|
||||
|
||||
@@ -24,6 +24,11 @@ d-i netcfg/dhcp_timeout string 120
|
||||
#d-i mirror/udeb/suite string testing
|
||||
|
||||
|
||||
# Use the following option to add additional boot parameters for the
|
||||
# installed system (if supported by the bootloader installer).
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string #XCATVAR:PERSKCMDLINE#
|
||||
|
||||
### Partitioning
|
||||
# This creates a small /boot partition, suitable
|
||||
# swap, and uses the rest of the space for the root partition:
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
compute.tmpl
|
||||
@@ -0,0 +1 @@
|
||||
compute.tmpl
|
||||
@@ -22,7 +22,11 @@ d-i netcfg/dhcp_timeout string 120
|
||||
#d-i mirror/suite string testing
|
||||
# Suite to use for loading installer components (optional).
|
||||
#d-i mirror/udeb/suite string testing
|
||||
|
||||
|
||||
# Use the following option to add additional boot parameters for the
|
||||
# installed system (if supported by the bootloader installer).
|
||||
# Note: options passed to the installer will be added automatically.
|
||||
d-i debian-installer/add-kernel-opts string #XCATVAR:PERSKCMDLINE#
|
||||
|
||||
### Partitioning
|
||||
# This creates a small /boot partition, suitable
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
cudafull.ubuntu14.04.2.ppc64el.pkglist
|
||||
@@ -69,7 +69,7 @@ my %consumptionrecord;
|
||||
my $commitinfofile="/tmp/commitinfo";
|
||||
my $gitupdateflag = 0;
|
||||
my $forceregwithoutupdate=0;
|
||||
|
||||
my $depupdateflag = 0;
|
||||
|
||||
#######################################
|
||||
# runcmd
|
||||
@@ -318,6 +318,52 @@ sub mn_install {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#######################################
|
||||
# down dep
|
||||
#######################################
|
||||
sub down_dep{
|
||||
my $mn=shift;
|
||||
send_msg(2, "[$mn->$confkeys{$mn}][down xcatdep] starting to down the latest xcat dep");
|
||||
my $downxcatdepdir="$regrootdir/curl/$mn";
|
||||
`mkdir -p $downxcatdepdir`;
|
||||
my $curllink = $confkeys{$mn."curllink"};
|
||||
my $deplink;
|
||||
if (! -f "$downxcatdepdir/curlhtml1"){
|
||||
send_msg(2, "it is first time to down xcatdep");
|
||||
` curl "$curllink" |grep "$curllink" |grep "href" > "$downxcatdepdir/curlhtml1" `;
|
||||
` sed -n '1p' "$downxcatdepdir/curlhtml1" > "$downxcatdepdir/curlfile"`;
|
||||
$deplink = `cat "$downxcatdepdir"/"curlfile" |sed "s/<a/\\ /" |sed 's/href="/\ /' |sed 's/"/\ /' | sed 's/^[[:space:]]*//' |sed 's#/download##g' `;
|
||||
print "deplink is $deplink\n";
|
||||
`mkdir -p $xcatdepdir/$mn`;
|
||||
` wget -P "$xcatdepdir/$mn" -c $deplink `;
|
||||
if($?){
|
||||
send_msg(0, "download xcatdep failed");
|
||||
return 1;
|
||||
}
|
||||
$depupdateflag=1;
|
||||
}else{
|
||||
`curl "$curllink" |grep "$curllink" |grep "href" > "$downxcatdepdir"/"curlhtml2"`;
|
||||
` diff "$downxcatdepdir"/"curlhtml1" "$downxcatdepdir"/"curlhtml2"`;
|
||||
if ($?==0) {
|
||||
send_msg(2, "no update for xcatdep ");
|
||||
$depupdateflag=0;
|
||||
}else{
|
||||
` sed -n '1p' "$downxcatdepdir"/"curlhtml2"> "$downxcatdepdir"/"curlfile"`;
|
||||
$deplink = `cat "$downxcatdepdir"/"curlfile" |sed "s/<a/\\ /" |sed 's/href="/\ /' |sed 's/"/\ /' | sed 's/^[[:space:]]*//' |sed 's#/download##g' `;
|
||||
print "deplink is $deplink\n";
|
||||
` rm -rf $xcatdepdir/$mn`;
|
||||
`mkdir -p $xcatdepdir/$mn`;
|
||||
` wget -P "$xcatdepdir/$mn" -c $deplink `;
|
||||
if($?){
|
||||
send_msg(2, "download xcatdep failed");
|
||||
return 1;
|
||||
}
|
||||
`mv "$downxcatdepdir"/"curlhtml2" "$downxcatdepdir"/"curlhtml1" -f `;
|
||||
$depupdateflag=2;
|
||||
}
|
||||
}
|
||||
return ($depupdateflag);
|
||||
}
|
||||
|
||||
#######################################
|
||||
# copy code
|
||||
@@ -330,11 +376,11 @@ sub copy_code {
|
||||
#copy xcat-dep tarball to MN:/
|
||||
my $depball="";
|
||||
if($mn =~ /aix/){
|
||||
$depball = `ls -l $xcatdepdir|awk '{print \$9}'|grep aix|tail -n 1`;
|
||||
$depball = `ls -l $xcatdepdir/$mn|awk '{print \$9}'|grep aix|tail -n 1`;
|
||||
}elsif($mn =~ /ubuntu/){
|
||||
$depball = `ls -l $xcatdepdir|awk '{print \$9}'|grep ubuntu|tail -n 1`;
|
||||
$depball = `ls -l $xcatdepdir/$mn|awk '{print \$9}'|grep ubuntu|tail -n 1`;
|
||||
}else{
|
||||
$depball = `ls -l $xcatdepdir|awk '{print \$9}'|grep 'xcat-dep-[0-9]\\{12\\}.tar.bz'|tail -n 1`;
|
||||
$depball = `ls -l $xcatdepdir/$mn|awk '{print \$9}'|grep 'xcat-dep-[0-9]\\{12\\}.tar.bz'|tail -n 1`;
|
||||
}
|
||||
chomp($depball);
|
||||
if ($depball eq ""){
|
||||
@@ -343,7 +389,7 @@ sub copy_code {
|
||||
}
|
||||
send_msg(2, "[$mn->$confkeys{$mn}][copy_code] find dep tarball $depball for $mn");
|
||||
|
||||
my $res = system("scp $xcatdepdir/$depball root\@$confkeys{$mn}:/ >/dev/null");
|
||||
my $res = system("scp $xcatdepdir/$mn/$depball root\@$confkeys{$mn}:/ >/dev/null");
|
||||
if ($?){
|
||||
send_msg(0, "[$mn->$confkeys{$mn}][copy_code] copy $depball to $mn failed");
|
||||
return 1;
|
||||
@@ -395,7 +441,7 @@ sub copy_code {
|
||||
send_msg(2, "[$mn->$confkeys{$mn}][copy_code] copy RPM-GPG-KEY-redhat-release to $mn successfully");
|
||||
|
||||
$os =~ /(\D+)(\d+\.\d+)/;
|
||||
$iso=`ls -l $osisodir|awk '{print \$9}'|grep RHEL|grep $arch|grep $2|tail -n 1`;
|
||||
$iso=`ls -l $osisodir|awk '{print \$9}'|grep RHEL`;
|
||||
chomp($iso);
|
||||
#print "[$mn->$confkeys{$mn}][copy_code] iso=$iso\n";
|
||||
if ($iso eq ""){
|
||||
@@ -549,12 +595,19 @@ sub install_xcat {
|
||||
$arch="x86_64" if($mn !~ /aix/ && $mn =~ /x/);
|
||||
|
||||
if($mn =~ /rh/){
|
||||
$os =~ /(\D+)(\d+)\.?(\d?)/;
|
||||
if($os =~ /rhels7/){
|
||||
system("xdsh $confkeys{$mn} \"cd /xcat-dep/rh7.0/$arch && ./mklocalrepo.sh\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"rpm --import /RPM-GPG-KEY-redhat-release\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"yum -y install xCAT xCAT-test > /var/log/xcat/install_xcat.log 2>&1\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"yum -y install mariadb-devel-5.5.35-3.el7 mariadb-libs-5.5.35-3.el7 mariadb-server-5.5.35-3.el7 mariadb-bench-5.5.35-3.el7 mariadb-5.5.35-3.el7 perl-DBD-MySQL mysql-connector-odbc unixODBC\" >/dev/null 2>&1");
|
||||
}elsif($os =~ /rhels6/){
|
||||
$os =~ /(\D+)(\d+)\.?(\d?)/;
|
||||
system("xdsh $confkeys{$mn} \"cd /xcat-dep/rh$2/$arch && ./mklocalrepo.sh\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"rpm --import /RPM-GPG-KEY-redhat-release\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"rpm --import /RPM-GPG-KEY-redhat-release\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"yum -y install xCAT xCAT-test > /var/log/xcat/install_xcat.log 2>&1\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"yum -y install mysql-server mysql mysql-bench mysql-devel mysql-connector-odbc\" >/dev/null 2>&1");
|
||||
system("xdsh $confkeys{$mn} \"source /etc/profile.d/xcat.sh\" >/dev/null 2>&1");
|
||||
}
|
||||
if($mn =~ /rhx/){
|
||||
system("xdsh $confkeys{$mn} \"yum install -y perl-Sys-Virt\" >/dev/null 2>&1");
|
||||
}
|
||||
@@ -596,6 +649,7 @@ sub install_xcat {
|
||||
#######################################
|
||||
sub do_test {
|
||||
my $mn = shift;
|
||||
my $os = $confkeys{$mn."os"};
|
||||
send_msg(2, "[$mn->$confkeys{$mn}][do_test] starting to run regression test in $confkeys{$mn}");
|
||||
|
||||
my $regconf=$mn.".conf";
|
||||
@@ -605,8 +659,10 @@ sub do_test {
|
||||
return 1;
|
||||
}
|
||||
send_msg(2, "[$mn->$confkeys{$mn}][do_test] copy $configfiledir/$regconf to $mn successfully");
|
||||
|
||||
my $diskfull_installation_flat_testcase="";
|
||||
if($os =~ /rhels7/){
|
||||
system("scp /opt/xcat/share/xcat/install/rh/service.rhels7.ppc64.otherpkgs.pkglist root\@$confkeys{$mn}:/opt/xcat/share/xcat/install/rh >/dev/null");
|
||||
}
|
||||
my $diskfull_installation_flat_testcase="";
|
||||
my $diskless_installation_flat_testcase="";
|
||||
my $statelite_installation_flat_testcase="";
|
||||
my $sn_installation_hierarchy_testcase="";
|
||||
@@ -659,7 +715,7 @@ sub do_test {
|
||||
|
||||
#deploy SN
|
||||
send_msg(2, "[$mn->$confkeys{$mn}][do_test] setting up mysql for installing SN in $mn.....");
|
||||
$res = system("xdsh $confkeys{$mn} \"XCATMYSQLADMIN_PW=12345 XCATMYSQLROOT_PW=12345 mysqlsetup -i\" >/dev/null 2>&1");
|
||||
$res = system("ssh -t $confkeys{$mn} 'exec bash -l -i -c \"XCATMYSQLADMIN_PW=12345 XCATMYSQLROOT_PW=12345 /opt/xcat/bin/mysqlsetup -i\"' >/dev/null 2>&1");
|
||||
if ($res != 0){
|
||||
send_msg(0, "[$mn->$confkeys{$mn}][do_test] set up mysql for installing SN in $mn failed");
|
||||
return 1;
|
||||
@@ -893,16 +949,27 @@ $cnt =`cat $mailfile |grep "Total"|grep "Failed"|wc -l`;
|
||||
# $gitupdateflag = 0 git update out of time
|
||||
# $gitupdateflag = 1 there isn't new code checkin in last one day
|
||||
# $gitupdateflag = 2 git update failed
|
||||
$depupdateflag = `cat $logfiledir/$logfile |grep "updated for xcat dep" `;
|
||||
my $subject="";
|
||||
if($gitupdateflag==0 || $gitupdateflag==2){
|
||||
$subject = "[$mailtitle] Git update failed, stop regression test today!!!";
|
||||
}elsif($gitupdateflag==1 && ! $forceregwithoutupdate){
|
||||
$subject = "[$mailtitle] No code checkin, stop regression test today!!!";
|
||||
}elsif($gitupdateflag==1 && $forceregwithoutupdate){
|
||||
$subject = "[$mailtitle] TotalCase:".$totalcase.", TotalRun:".$totalcnt.", Fail:".$failcnt.", Branch:".$branch.", Checkin: NO ONE!!";
|
||||
}else{
|
||||
$subject = "[$mailtitle] TotalCase:".$totalcase.", TotalRun:".$totalcnt.", Fail:".$failcnt.", Branch:".$branch.", Checkin: ".$checkinlist;
|
||||
}
|
||||
`cat $logfiledir/$logfile |grep "updated for xcat dep" `;
|
||||
if($?==0){
|
||||
$subject = "[$mailtitle] TotalCase:".$totalcase.", TotalRun:".$totalcnt.", Fail:".$failcnt.", Branch:".$branch.", xcatdep updated, Checkin: NO ONE !!";
|
||||
}else{
|
||||
$subject = "[$mailtitle] TotalCase:".$totalcase.", TotalRun:".$totalcnt.", Fail:".$failcnt.", Branch:".$branch.", xcatdep no updated, Checkin: NO ONE !!";
|
||||
}
|
||||
}else{
|
||||
`cat $logfiledir/$logfile |grep "updated for xcat dep" `;
|
||||
if($?==0){
|
||||
$subject = "[$mailtitle] TotalCase:".$totalcase.", TotalRun:".$totalcnt.", Fail:".$failcnt.", Branch:".$branch.", xcatdep updated, Checkin: ".$checkinlist;
|
||||
}else{
|
||||
$subject = "[$mailtitle] TotalCase:".$totalcase.", TotalRun:".$totalcnt.", Fail:".$failcnt.", Branch:".$branch.", xcatdep no updated, Checkin: ".$checkinlist;
|
||||
}
|
||||
}
|
||||
my $mailreport .= "\n\n======================================\n";
|
||||
$mailreport .= " Commit Codes Last Day\n";
|
||||
$mailreport .= "======================================\n\n";
|
||||
@@ -1238,52 +1305,61 @@ foreach my $m (keys %mns) {
|
||||
exit 1;
|
||||
}
|
||||
send_msg(2, "[$m]step 3, Run mn_install...............[OK]");
|
||||
|
||||
#######################################
|
||||
# step 4. Copy code to MNs
|
||||
# step 4. Down xcatdep to MNs
|
||||
#######################################
|
||||
send_msg(2, "[$m]step 4, Running copy_code...............");
|
||||
send_msg(2, "[$m]step 4, Down xcatdep...............");
|
||||
$depupdateflag = down_dep($m);
|
||||
if ($depupdateflag ==2){
|
||||
send_msg(2, "[$m]step 4, updated for xcat dep");
|
||||
}else{
|
||||
send_msg(2, "[$m]step 4, no update for xcat dep");
|
||||
}
|
||||
#######################################
|
||||
# step 5. Copy code to MNs
|
||||
#######################################
|
||||
send_msg(2, "[$m]step 5, Running copy_code...............");
|
||||
$res = copy_code($m);
|
||||
if ($res) {
|
||||
syswrite MNWRITE,"REPORTFROM:$m->$mn: copy xcat source code to $mn failed\n";
|
||||
exit 1;
|
||||
}
|
||||
send_msg(2, "[$m]step 4, Run copy_code...............[OK]");
|
||||
send_msg(2, "[$m]step 5, Run copy_code...............[OK]");
|
||||
|
||||
#######################################
|
||||
# step 5. Build xcat code in MNs
|
||||
# step 6. Build xcat code in MNs
|
||||
#######################################
|
||||
send_msg(2, "[$m]step 5, Running build_xcat...............");
|
||||
send_msg(2, "[$m]step 6, Running build_xcat...............");
|
||||
$res = build_xcat($m);
|
||||
if ($res) {
|
||||
syswrite MNWRITE,"REPORTFROM:$m->$mn: build new xcat in $mn failed\n";
|
||||
exit 1;
|
||||
}
|
||||
send_msg(2, "[$m]step 5, Run build_xcat...............[OK]");
|
||||
send_msg(2, "[$m]step 6, Run build_xcat...............[OK]");
|
||||
|
||||
#######################################
|
||||
# step 6. Read xCAT MN's configuration
|
||||
# step 7. Read xCAT MN's configuration
|
||||
#######################################
|
||||
send_msg(2, "[$m]step 6, Running install_xcat...............");
|
||||
send_msg(2, "[$m]step 7, Running install_xcat...............");
|
||||
$res = install_xcat($m);
|
||||
if ($res) {
|
||||
syswrite MNWRITE,"REPORTFROM:$m->$mn: install new xcat in $mn failed\n";
|
||||
exit 1;
|
||||
}
|
||||
send_msg(2, "[$m]step 6, Run install_xcat...............[OK]");
|
||||
send_msg(2, "[$m]step 7, Run install_xcat...............[OK]");
|
||||
|
||||
#######################################
|
||||
# step 7. Genrate local configuration file for xcattest
|
||||
# step 8. Genrate local configuration file for xcattest
|
||||
# Do test
|
||||
# Write log
|
||||
#######################################
|
||||
send_msg(2, "[$m]step 7, Running do_test...............");
|
||||
send_msg(2, "[$m]step 8, Running do_test...............");
|
||||
$res = do_test($m);
|
||||
if ($res) {
|
||||
syswrite MNWRITE,"REPORTFROM:$m->$mn: run regression test cases in $mn failed\n";
|
||||
exit 1;
|
||||
}
|
||||
send_msg(2, "[$m]step 7, Running do_test...............[OK]");
|
||||
send_msg(2, "[$m]step 8, Running do_test...............[OK]");
|
||||
|
||||
send_msg(2, "whole regression test for $mn finished");
|
||||
syswrite MNWRITE,"REPORTFROM:$m->$mn: whole regression test are successful\n";
|
||||
|
||||
@@ -31,8 +31,6 @@ lsdef_t
|
||||
lsdef_t_i_o
|
||||
lsdef_t_w
|
||||
lsdef_t_err
|
||||
lslite_i
|
||||
lslite_h
|
||||
makeconservercf_null
|
||||
makeconservercf_noderange
|
||||
makeconservercf_d
|
||||
|
||||
@@ -44,13 +44,18 @@ check:rc==0
|
||||
|
||||
cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkgdir=/install/post/otherpkgs/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__
|
||||
check:rc==0
|
||||
cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
|
||||
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
|
||||
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.__GETNODEATTR($$SN,os).__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
|
||||
#check:rc==0
|
||||
|
||||
cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`; chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist; elif cat /etc/*release |grep "7.0" |grep "Red Hat">/dev/null;then chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.__GETNODEATTR($$SN,os)__.ppc64.otherpkgs.pkglist;elif cat /etc/*release |grep "Red Hat" |grep "6.5">/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.otherpkgs.pkglist;fi
|
||||
|
||||
check:rc==0
|
||||
|
||||
|
||||
cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;for i in mysql-client libmysqlclient_r15 libqt4-sql-mysql libmysqlclient15 perl-DBD-mysql mysql; do cat /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; fi done; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;for i in mysql; do cat /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist; fi done;fi
|
||||
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;for i in mysql-client libmysqlclient_r15 libqt4-sql-mysql libmysqlclient15 perl-DBD-mysql mysql; do cat /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; fi done; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;for i in mysql; do cat /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.rhels$ver.ppc64.pkglist; fi done;fi
|
||||
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;for i in mariadb-devel-5.5.35-3.el7 mariadb-libs-5.5.35-3.el7 mariadb-server-5.5.35-3.el7 mariadb-bench-5.5.35-3.el7 mariadb-5.5.35-3.el7 perl-DBD-MySQL mysql-connector-odbc unixODBC; do cat /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; fi done; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=__GETNODEATTR($$SN,os)__;for i in mysql; do cat /opt/xcat/share/xcat/install/rh/service.$ver.ppc64.pkglist|grep "$i$";if [ $? -ne 0 ] ; then echo "$i" >> /opt/xcat/share/xcat/install/rh/service.$ver.ppc64.pkglist; fi done;fi
|
||||
check:rc==0
|
||||
cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.pkglist;fi
|
||||
#cmd:if cat /etc/*release |grep SUSE >/dev/null;then ver=`cat /etc/*release |grep "VERSION = " | sed 's:VERSION = \(.*\):\1:g'`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/sles/service.sles$ver.pkglist; elif cat /etc/*release |grep "Red Hat" >/dev/null;then ver=`cat /etc/*release |awk '{print $7}' |awk -F"." '{print $1}'|head -n 1`;chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkglist=/opt/xcat/share/xcat/install/rh/service.rhels$ver.__GETNODEATTR($$SN,arch)__.pkglist;fi
|
||||
check:rc==0
|
||||
cmd:chdef -t osimage __GETNODEATTR($$SN,os)__-__GETNODEATTR($$SN,arch)__-install-service pkgdir="/install/__GETNODEATTR($$SN,os)__/__GETNODEATTR($$SN,arch)__"
|
||||
check:rc==0
|
||||
@@ -88,9 +93,9 @@ check:output=~/install on /install
|
||||
cmd:xdsh $$SN "mount"
|
||||
check:rc==0
|
||||
check:output=~/tftpboot on /tftpboot
|
||||
cmd:xdsh $$SN "nslookup $$CN"
|
||||
check:rc==0
|
||||
check:output!~server can't find $$CN
|
||||
#cmd:xdsh $$SN "nslookup $$CN"
|
||||
#check:rc==0
|
||||
#check:output!~server can't find $$CN
|
||||
|
||||
cmd:if [[ "__GETNODEATTR($$SN,arch)__" =~ "x86_64" ]]; then if cat /etc/*release |grep SUSE >/dev/null;then xdsh $$SN "zypper -n install perl-Sys-Virt"; elif cat /etc/*release |grep "Red Hat" >/dev/null;then xdsh $$SN "yum install -y perl-Sys-Virt";fi;fi
|
||||
check:rc==0
|
||||
|
||||
@@ -55,5 +55,4 @@ check:rc==0
|
||||
check:output=~\d\d:\d\d:\d\d
|
||||
cmd:xdsh $$CN mount
|
||||
check:rc==0
|
||||
check:output=~on / type ext
|
||||
end
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
start:Ubuntu_full_installation_flat_x86_vm
|
||||
os:Linux
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
cmd:chdef $$CN postscripts="confignics -s"
|
||||
check:rc==0
|
||||
cmd:makedns -n
|
||||
check:rc==0
|
||||
cmd:sleep 60
|
||||
cmd:makedhcp -n
|
||||
check:rc==0
|
||||
cmd:makedhcp -a
|
||||
check:rc==0
|
||||
cmd:makeconservercf $$CN
|
||||
check:rc==0
|
||||
cmd:cat /etc/conserver.cf | grep $$CN
|
||||
check:output=~$$CN
|
||||
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
|
||||
check:rc==0
|
||||
cmd:rpower $$CN boot
|
||||
check:rc==0
|
||||
cmd:sleep 2000
|
||||
cmd:ping $$CN -c 3
|
||||
check:output=~64 bytes from $$CN
|
||||
cmd:lsdef -l $$CN | grep status
|
||||
check:output=~booted
|
||||
cmd:xdsh $$CN date
|
||||
check:rc==0
|
||||
check:output=~\d\d:\d\d:\d\d
|
||||
cmd:nodeset $$CN osimage
|
||||
check:rc==0
|
||||
cmd:rpower $$CN reset
|
||||
check:rc==0
|
||||
cmd:sleep 2000
|
||||
cmd:ping $$CN -c 3
|
||||
check:output=~64 bytes from $$CN
|
||||
cmd:lsdef -l $$CN | grep status
|
||||
check:output=~booted
|
||||
cmd:xdsh $$CN date
|
||||
check:rc==0
|
||||
check:output=~\d\d:\d\d:\d\d
|
||||
cmd:port=`xdsh $$CN ip addr |grep $$INSTALLNICIP |cut -f 12 -d ' '`;if [ "$$OS" = "ubuntu" ];then xdsh $$CN cat /etc/network/interfaces.d/$port ; elif [ "$$OS" = "rhels" ]; then xdsh $$CN cat /etc/sysconfig/network-scripts/ifcfg-$port;else xdsh $$CN cat /etc/sysconfig/network/ifcfg-$port; fi
|
||||
check:output=~$$INSTALLNICIP
|
||||
check:output=~static
|
||||
check:output!=\d\d:\d\d:\d\d
|
||||
cmd:if [ "$$OS" = "ubuntu" ];then xdsh $$CN cat /etc/network/interfaces ; elif [ "$$OS" = "rhels" ]; then xdsh $$CN cat /etc/sysconfig/network;else xdsh $$CN cat /etc/sysconfig/network/routes; fi
|
||||
check:rc==0
|
||||
check:output=~$$GATEWAY
|
||||
end
|
||||
@@ -2,8 +2,8 @@ start:packimage_o_p_a_m
|
||||
os:Linux
|
||||
description:
|
||||
cmd:copycds $$ISO
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz /rootimg.gz.bak;fi
|
||||
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
|
||||
check:rc==0
|
||||
cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
@@ -12,14 +12,16 @@ cmd:packimage -o __GETNODEATTR($$CN,os)__ -p compute -a __GETNODEATTR($$CN,arch)
|
||||
check:rc==0
|
||||
cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
check:rc==0
|
||||
cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:mv -f /rootimg.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
cmd:mv -f /rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
end
|
||||
|
||||
start:packimage_p_a_o
|
||||
os:Linux
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz /rootimg.gz.bak;fi
|
||||
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
|
||||
check:rc==0
|
||||
cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
@@ -28,15 +30,17 @@ cmd:packimage -p compute -a __GETNODEATTR($$CN,arch)__ -o __GETNODEATTR($$CN,os)
|
||||
check:rc==0
|
||||
cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
check:rc==0
|
||||
cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:mv -f /rootimg.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
cmd:mv -f /rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
end
|
||||
|
||||
start:packimage_imagename
|
||||
os:Linux
|
||||
description:
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg /rootimg.bak;fi
|
||||
cmd:ls /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz;if [ $? -eq 0 ];then mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz /rootimg.gz.bak;fi
|
||||
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
|
||||
check:rc==0
|
||||
cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
@@ -45,8 +49,10 @@ cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-comput
|
||||
check:rc==0
|
||||
cmd:ls -l /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
check:rc==0
|
||||
cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:mv -f /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:mv -f /rootimg.gz.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg.gz
|
||||
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
cmd:mv -f /rootimg.bak /install/netboot/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/compute/rootimg
|
||||
end
|
||||
|
||||
start:packimage_h
|
||||
|
||||
+37
-5
@@ -25,7 +25,6 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
# pmatch determines if 1st argument string is matched by 2nd argument pattern
|
||||
|
||||
pmatch ()
|
||||
{
|
||||
case $1 in
|
||||
@@ -336,6 +335,7 @@ fi
|
||||
pkgs='' #packages
|
||||
groups='' #groups
|
||||
pkgs_d='' #packages to remove
|
||||
cudapkgs='' #cuda pkg set
|
||||
|
||||
OIFS=$IFS
|
||||
IFS=$','
|
||||
@@ -368,13 +368,20 @@ do
|
||||
groups="$groups $tmp"
|
||||
fi
|
||||
else
|
||||
pkgs="$pkgs $x"
|
||||
if ( pmatch "$x" "cuda*" ); then
|
||||
cudapkgs="$cudapkgs $x"
|
||||
else
|
||||
pkgs="$pkgs $x"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $debug -ne 0 ]; then
|
||||
echo "pkgs=$pkgs"
|
||||
if [ -n "$cudapkgs" ]; then
|
||||
echo "cudapkgs=$cudapkgs"
|
||||
fi
|
||||
echo "groups=$groups"
|
||||
echo "remove pkgs=$pkgs_d"
|
||||
fi
|
||||
@@ -672,6 +679,9 @@ elif ( pmatch "$OSVER" "ubuntu*" ); then
|
||||
# check whether the os package path in primary apt source (/etc/apt/sources.list) or not
|
||||
# if the os package path does not exist in /etc/apt/sources.list,
|
||||
# create apt source file in /etc/apt/sources.list.d
|
||||
|
||||
# replace space with "===" to avoid the string split issue
|
||||
OSPKGDIR=`echo $OSPKGDIR | sed 's/\ /===/g'`
|
||||
|
||||
prirepo=/etc/apt/sources.list
|
||||
repoprefix=/etc/apt/sources.list.d/xCAT-${OSVER}-path
|
||||
@@ -679,21 +689,27 @@ elif ( pmatch "$OSVER" "ubuntu*" ); then
|
||||
IFS=","
|
||||
pkgdirs=($OSPKGDIR)
|
||||
IFS=$oldif
|
||||
|
||||
repocount=0
|
||||
for dir in ${pkgdirs[@]}; do
|
||||
dir=`echo $dir | sed 's/\=\=\=/\ /g'`
|
||||
|
||||
if grep "^deb\ .*$dir" $prirepo; then
|
||||
continue
|
||||
fi
|
||||
#create apt source file in /etc/apt/sources.list.d
|
||||
echo "deb http://$NFSSERVER/$dir ./" > "${repoprefix}${repocount}.list"
|
||||
result=`echo $dir | grep -E "^http:.*"`
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "deb $dir" > "${repoprefix}${repocount}.list"
|
||||
else
|
||||
echo "deb http://$NFSSERVER/$dir ./" > "${repoprefix}${repocount}.list"
|
||||
fi
|
||||
repocount=$(($repocount+1))
|
||||
done
|
||||
|
||||
# upgrade existing packages
|
||||
apt-get -y update
|
||||
command="DEBIAN_FRONTEND=noninteractive apt-get -y --allow-unauthenticated --force-yes -o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef' upgrade "
|
||||
echo "=== $command"
|
||||
echo "=== $command"
|
||||
eval $command
|
||||
R=$?
|
||||
if [ $R -ne 0 ]; then
|
||||
@@ -723,6 +739,22 @@ elif ( pmatch "$OSVER" "ubuntu*" ); then
|
||||
RETURNVAL=$R
|
||||
fi
|
||||
fi
|
||||
if [ -n "$cudapkgs" ]; then
|
||||
|
||||
command="$ENVLIST apt-get -q -y --force-yes install --no-install-recommends $cudapkgs"
|
||||
echo "=== $command"
|
||||
# the nvidia-346 postinstall script will trigger the building of nvidia driver, it will use the ARCH environment parameter, unset the ARCH env variable will resolve this issue
|
||||
original_arch=$ARCH
|
||||
unset ARCH
|
||||
eval $command
|
||||
# re declare the ARCH env after installing cuda command done
|
||||
ARCH=$original_arch
|
||||
export ARCH
|
||||
R=$?
|
||||
if [ $R -ne 0 ]; then
|
||||
RETURNVAL=$R
|
||||
fi
|
||||
fi
|
||||
|
||||
# remove packages
|
||||
if [ -n "$pkgs_d" ]; then
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#enable debug
|
||||
set -x
|
||||
#set -x
|
||||
|
||||
# pmatch determines if 1st argument string is matched by 2nd argument pattern
|
||||
|
||||
|
||||
+14
-8
@@ -137,16 +137,22 @@ fi
|
||||
%post
|
||||
%ifos linux
|
||||
#Apply the correct httpd/apache configuration file according to the httpd/apache version
|
||||
if [ -n "$(httpd -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
|
||||
then
|
||||
rm -rf /etc/httpd/conf.d/xcat.conf
|
||||
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/httpd/conf.d/xcat.conf
|
||||
|
||||
compare_version="2.4"
|
||||
version=`rpm -qi httpd 2>&1 | grep 'Version' | awk '$NF { print $3 }' | cut -d. -f1,2`
|
||||
if [ -n "$version" ]; then
|
||||
if (( `bc <<< "$version >= $compare_version"` )); then
|
||||
rm -rf /etc/httpd/conf.d/xcat.conf
|
||||
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/httpd/conf.d/xcat.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$(apachectl -v 2>&1 |grep -e '^Server version\s*:.*\/2.4')" ]
|
||||
then
|
||||
rm -rf /etc/apache2/conf.d/xcat.conf
|
||||
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf
|
||||
version=`rpm -qi apache2 2>&1 | grep '^Version' | awk '$NF { print $3 }' | cut -d. -f1,2`
|
||||
if [ -n "$version" ]; then
|
||||
if (( `bc <<< "$version >= $compare_version"` )); then
|
||||
rm -rf /etc/apache2/conf.d/xcat.conf
|
||||
cp /etc/xcat/conf.orig/xcat.conf.apach24 /etc/apache2/conf.d/xcat.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user