Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core

This commit is contained in:
root 2014-11-24 18:40:15 -08:00
commit c5549a6533
46 changed files with 311 additions and 81 deletions

View File

@ -194,7 +194,8 @@ then
if [ ! -d ../../$package_dir_name ];then
mkdir -p "../../$package_dir_name"
fi
packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT-UI xCAT xCATsn xCAT-test xCAT-OpenStack xCAT-OpenStack-baremetal xCAT-buildkit"
#packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT-UI xCAT xCATsn xCAT-test xCAT-OpenStack xCAT-OpenStack-baremetal xCAT-buildkit"
packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test xCAT-buildkit"
target_archs=(amd64 ppc64el)
for file in `echo $packages`
do

View File

@ -41,7 +41,8 @@ UPLOADUSER=bp-sawyers
FRS=/home/frs/project/x/xc/xcat
# These are the rpms that should be built for each kind of xcat build
ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-OpenStack xCAT-SoftLayer xCAT-OpenStack-baremetal"
#ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-OpenStack xCAT-SoftLayer xCAT-OpenStack-baremetal"
ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn xCAT-genesis-scripts xCAT-SoftLayer"
ZVMBUILD="perl-xCAT xCAT-server xCAT-UI"
ZVMLINK="xCAT-client xCAT xCATsn"
# xCAT and xCATsn have PCM specific configuration - conserver-xcat, syslinux-xcat

View File

@ -311,9 +311,6 @@ sub notify {
my ($modname, $path, $suffix) = fileparse($_, ".pm");
# print "modname=$modname, path=$path, suffix=$suffix\n";
if ($suffix =~ /.pm/) { #it is a perl module
my $pid;
if ($pid=xCAT::Utils->xfork()) { }
elsif (defined($pid)) {
my $fname;
if (($path eq "") || ($path eq ".\/")) {
#default path is /opt/xcat/lib/perl/xCAT_monitoring/ if there is no path specified
@ -328,8 +325,7 @@ sub notify {
else {
${"xCAT_monitoring::".$modname."::"}{processTableChanges}->($action, $tablename, $old_data, $new_data);
}
exit 0;
}
return 0;
}
else { #it is a command
my $pid;

View File

@ -179,6 +179,10 @@ sub init_dbworker {
#setup signal in NotifHandler so that the cache can be updated
xCAT::NotifHandler::setup($$, 0);
# NOTE: There's a bug that sometimes the %SIG is cleaned up by accident, but we cannot figure out when and why
# this happens. The temporary fix is to backup the %SIG and recover it when necessary.
my %SIGbakup = %SIG;
while (not $exitdbthread) {
eval {
my @ready_socks = $clientset->can_read;
@ -191,6 +195,7 @@ sub init_dbworker {
} else {
eval {
handle_dbc_conn($currcon,$clientset);
unless (%SIG && defined ($SIG{USR1})) { %SIG = %SIGbakup; }
};
if ($@) {
my $err=$@;
@ -3837,7 +3842,7 @@ sub writeAllEntries
}
my $filename = shift;
my $fh;
my $rc;
my $rc = 0;
# open the file for write
unless (open($fh," > $filename")) {
my $msg="Unable to open $filename for write \n.";

View File

@ -2162,7 +2162,72 @@ sub osver
my $line = '';
my @lines;
my $relfile;
if (-f "/etc/redhat-release")
if (-f "/etc/os-release"){
my $version;
my $version_id;
my $id;
my $id_like;
my $name;
my $prettyname;
my $verrel;
if (open($relfile,"<","/etc/os-release")) {
my @text = <$relfile>;
close($relfile);
chomp(@text);
#print Dumper(\@text);
foreach my $line (@text){
if($line =~ /^\s*VERSION=\"?([0-9\.]+).*/){
$version=$1;
}
if($line =~ /^\s*VERSION_ID=\"?([0-9\.]+).*/){
$version_id=$1;
}
if($line =~ /^\s*ID=\"?([0-9a-z\_\-\.]+).*/){
$id=$1;
}
if($line =~ /^\s*ID_LIKE=\"?([0-9a-z\_\-\.]+).*/){
$id_like=$1;
}
if($line =~ /^\s*NAME=\"?(.*)/){
$name=$1;
}
if($line =~ /^\s*PRETTY_NAME=\"?(.*)/){
$prettyname=$1;
}
}
}
$os=$id;
if (!$os and $id_like) {
$os=$id_like;
}
$verrel=$version;
if (!$verrel and $version_id) {
$verrel=$version_id;
}
if(!$name and $prettyname){
$name=$prettyname;
}
if($os =~ /rhel/ and $name =~ /Server/i){
$os="rhels";
}
if($verrel =~ /([0-9]+)\.?(.*)/) {
$ver=$1;
$rel=$2;
}
# print "$ver -- $rel";
}
elsif (-f "/etc/redhat-release")
{
open($relfile,"<","/etc/redhat-release");
$line = <$relfile>;
@ -2269,8 +2334,10 @@ sub osver
close($relfile);
}
}
#print "xxxx $type === $rel \n";
if ( $type and $type =~ /all/ ) {
if ( $rel ) {
if ( $rel ne "") {
# print "xxx $os-$ver-$rel \n";
return( "$os" . "," . "$ver" . ".$rel" );
} else {
return( "$os" . "," . "$ver" );

View File

@ -1163,7 +1163,7 @@ sub edit_bldkitconf
my ($osbasename,$osmore) = split(/\,/, $osinfo);
my ($osmajorversion,$osminorversion) = split(/\./, $osmore);
my $osarch=`uname -p`;
chomp($osarch);
my $kitcomponent_basename = $kitname."_compute";
if ($debianflag==1) {

View File

@ -147,29 +147,41 @@ if ( -e "/etc/debian_version" ){
# determine whether redhat or sles
$::linuxos = xCAT::Utils->osver();
#
# check to see if mysql is installed
#
my $cmd = "rpm -qa | grep -i perl-DBD-mysql";
if ( $::debianflag ){
$cmd = "dpkg -l | grep mysql-server";
}
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
my $message =
"\nMySQL perl DBD is not installed. If on AIX, it should be first obtained from the xcat dependency tarballs and installed before running this command.\n If on Linux, install from the OS CDs.";
xCAT::MsgUtils->message("E", " $cmd failed. $message");
exit(1);
}
# is this MariaDB or MySQL
$::MariaDB=0;
$cmd = "rpm -qa | grep -i mariadb"; # check this is MariaDB not MySQL
my $cmd;
if ( $::debianflag ){
$cmd = "dpkg -l | grep mariadb";
} else {
$cmd = "rpm -qa | grep -i mariadb"; # check this is MariaDB not MySQL
}
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0) {
$::MariaDB=1;
}
#
# check to see if mysql is installed
#
$cmd = "rpm -qa | grep -i perl-DBD-mysql";
my $msg = "\nMySQL perl DBD ";
if ( $::debianflag ){
if ( $::MariaDB ){
$cmd = "dpkg -l | grep -i mariadb-server";
$msg = "\nmariadb-server ";
} else {
$cmd = "dpkg -l | grep mysql-server";
$msg = "\nmysql-server ";
}
}
xCAT::Utils->runcmd($cmd, 0);
if ($::RUNCMD_RC != 0)
{
my $message =
"\n$msg is not installed. If on AIX, it should be first obtained from the xcat dependency tarballs and installed before running this command.\n If on Linux, install from the OS CDs.";
xCAT::MsgUtils->message("E", " $cmd failed. $message");
exit(1);
}
# check to see if MySQL is running
$::mysqlrunning = 0;
$::xcatrunningmysql = 0;
@ -187,6 +199,29 @@ if (grep(/$mysqlcheck/, @output))
}
$::mysqlrunning = 1;
}
#for ubuntu 14, after install mysql/maria server, the mysql will running
#need to stop mysql in order to setup init xcat mysql
if ( $::debianflag ){
$cmd = "pidof mysqld";
xCAT::Utils->runcmd($cmd, -1);
if ($::RUNCMD_RC == 0)
{
if ($::INIT)
{
my $ret=xCAT::Utils->stopservice("mysql");
if ($ret != 0)
{
xCAT::MsgUtils->message("E", " failed to stop mysql/mariadb.");
exit(1);
}
}
else {
$::mysqlrunning = 1;
}
}
}
if (-e ("/etc/xcat/cfgloc")) # check to see if xcat is using mysql
{ # cfgloc exists
$cmd = "fgrep mysql /etc/xcat/cfgloc";
@ -1000,6 +1035,10 @@ sub mysqlreboot
$cmd = "chkconfig mariadb on";
} else { #sles
$cmd = "chkconfig mysql on";
if ( $::debianflag ){
$cmd = "update-rc.d mysql defaults";
}
}
} else { # mysql
if ($::linuxos =~ /rh.*/)

View File

@ -192,6 +192,14 @@ sub parse_attr_for_osimage{
return -1;
}
my ($tmp_imagetype, $tmp_arch, $tmp_osname,$tmp_ostype,$tmp_osvers);
if (!exists($attr_hash->{osvers})) {
$tmp_osvers = xCAT::Utils->osver("all");
$tmp_osvers =~ s/,//;
$attr_hash->{osvers} = $tmp_osvers;
} else {
$tmp_osvers =$attr_hash->{osvers};
}
if (!exists($attr_hash->{osarch})) {
$tmp_arch = `uname -m`;
chomp($tmp_arch);
@ -200,13 +208,13 @@ sub parse_attr_for_osimage{
} else {
$tmp_arch = $attr_hash->{osarch};
}
if (!exists($attr_hash->{osvers})) {
$tmp_osvers = xCAT::Utils->osver("all");
$tmp_osvers =~ s/,//;
$attr_hash->{osvers} = $tmp_osvers;
} else {
$tmp_osvers =$attr_hash->{osvers};
}
#for ubuntu,the the arch attribute "ppc64le" should be modified to "ppc64el"
if(($tmp_osvers =~ /^ubuntu/i) && ($tmp_arch =~ /^ppc64le/i)){
$tmp_arch="ppc64el";
$attr_hash->{osarch} = "ppc64el";
}
$tmp_osname = $tmp_osvers;
$tmp_ostype="Linux"; #like Linux, Windows
$tmp_imagetype="linux";

View File

@ -1879,6 +1879,7 @@ sub mksysclone
}
# copy kernel and initrd from image dir to /tftpboot
=pod
my $kernpath;
my $initrdpath;
my $ramdisk_size = 200000;
@ -1889,6 +1890,14 @@ sub mksysclone
and -r "$tftpdir/xcat/genesis.fs.$arch.lzma"
and $initrdpath = "$tftpdir/xcat/genesis.fs.$arch.lzma"
)
=cut
my $ramdisk_size = 200000;
my $kernpath=`ls -l $tftpdir/xcat/|grep "genesis.kernel.$arch"|awk '{print \$9}'`;
chomp($kernpath);
my $initrdpath=`ls -l $tftpdir/xcat/|grep "genesis.fs.$arch"| awk '{print \$9}'`;
chomp($initrdpath);
if($kernpath ne '' and $initrdpath ne '')
{
#We have a shot...
my $ent = $rents{$node}->[0];
@ -1985,10 +1994,14 @@ sub mksysclone
# $kcmdline .= " ";
# $kcmdline .= $addkcmd->{'addkcmdline'};
#}
my $k;
my $i;
$k = "xcat/genesis.kernel.$arch";
$i = "xcat/genesis.fs.$arch.lzma";
#$k = "xcat/genesis.kernel.$arch";
#$i = "xcat/genesis.fs.$arch.lzma";
$k = "xcat/$kernpath";
$i = "xcat/$initrdpath";
$bptab->setNodeAttribs(
$node,
@ -2067,6 +2080,11 @@ sub mksysclone
if($retcode!=0){
my $rc = xCAT::Utils->startservice("systemimager-server-rsyncd");
if ($rc != 0) {
$callback->(
{error => ["systemimager-server-rsyncd start unsuccessfully. please check if there is rsync service already run in your s
erver, if so, stop it first and try again"],
errorcode => [1]}
);
return 1;
}
}

View File

@ -1587,6 +1587,11 @@ sub mksysclone
if($retcode !=0){
my $rc = xCAT::Utils->startservice("systemimager-server-rsyncd");
if ($rc != 0) {
$callback->(
{error => ["systemimager-server-rsyncd start unsuccessfully. please check if there is rsync service already run in your s
erver, if so, stop it first and try again"],
errorcode => [1]}
);
return 1;
}
}

View File

@ -740,7 +740,7 @@ sub tabdump
output_table($table,$cb,$tabh,$recs);
} else { # dump to file
my $rc1;
my $rc1 = 0;
my $fh;
# check to see if you can open the file
unless (open($fh," > $FILENAME")) {

View File

@ -977,6 +977,15 @@ unless ($pid_UDP) {
xexit(0);
}
close($udpbroker);
$SIG{TERM} = $SIG{INT} = sub {
if ($pid_disco) {
kill 2, $pid_disco;
}
$SIG{ALRM} = sub { xexit 0; }; #die "Did not close out in time for 2 second grace period"; };
alarm(2);
};
do_udp_service(discoctl=>$discoctl,discopid=>$pid_disco);
xexit(0);
}
@ -2148,7 +2157,7 @@ sub get_request {
my $encode = shift;
my $request = shift;
if ($encode eq "xml") {
my $line = "";
my $line = $request;
while ((!$request) || ($request !~ m/<\/xcatrequest>/)) {
my $flags=fcntl($sock,F_GETFL,0);
$flags |= O_NONBLOCK; #we want sysread to bail on us, select seems to be evil to us still..
@ -2162,7 +2171,7 @@ sub get_request {
$flags=fcntl($sock,F_GETFL,0);
$flags &= ~O_NONBLOCK; #now we want *print* to be blocking IO
fcntl($sock,F_SETFL,$flags);
$request .= $line;
$request = $line;
}
return eval { XMLin($request, SuppressEmpty=>undef,ForceArray=>1) };
} elsif ($encode eq "storable") {

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh
#
#
# Sample script to customize options for Mellonax OFED IB support
@ -143,8 +143,8 @@ deb http://91.189.88.140/ubuntu-ports/ trusty-updates universe" >> /etc/apt/sour
cat /etc/os-release|grep NAME|grep Ubuntu>/dev/null &&
uname -m |grep ppc64 >/dev/null
then
echo "ARCH=powerpc perl -x mlnxofedinstall $mlnxofed_options"
ARCH=powerpc perl -x mlnxofedinstall --without-fw-update $mlnxofed_options
echo "ARCH=powerpc perl -x mlnxofedinstall --without-fw-update $mlnxofed_options"
ARCH=powerpc perl -x mlnxofedinstall --without-fw-update $mlnxofed_options
sleep 1
service openibd restart
else
@ -211,10 +211,50 @@ deb http://91.189.88.140/ubuntu-ports/ trusty-updates universe" >> $sourceslist
mount --bind /dev $installroot/dev/
mount --bind /proc $installroot/proc/
mount --bind /sys $installroot/sys/
chroot $installroot apt-get install -y linux-headers-$(uname -r)
echo "perl -x mlnxofedinstall $mlnxofed_options"
mv "${installroot}/bin/uname" "${installroot}/bin/uname.nouse"
# cat <<-EOF >"${installroot}/bin/uname"
# #!/bin/sh
# [ "\$1" = "-r" ] && cd /lib/modules && for d in *; do :; done && echo \$d
# [ "\$1" = "-m" ] && if [ -d "/proc/powerpc" ];then echo ppc64le;else echo x86_64;fi
# [ "\$1" = "-s" ] && echo Linux
# exit 0
# EOF
cat <<-EOF >"${installroot}/bin/uname"
#!/bin/sh
case "\$1" in
"-m")
ARCH="\$(dpkg --print-architecture || rpm -q kernel-\$("\$0" -r) --qf '%{arch}')"
case "\$ARCH" in
"amd64")
ARCH="x86_64"
;;
"ppc64el")
ARCH="ppc64le"
;;
esac
echo "\$ARCH"
;;
"-r")
cd /lib/modules && for d in * ; do : ; done && echo \$d
;;
"-s"|"")
echo "Linux"
;;
esac
exit 0
EOF
# head -n 999 "${installroot}/bin/uname"
chmod 0755 "${installroot}/bin/uname"
chroot $installroot sh -c 'apt-get install -y linux-headers-$(uname -r)'
echo "perl -x /tmp/ofed_install/ofed/mlnxofedinstall --without-fw-update $mlnxofed_options"
chroot $installroot perl -x /tmp/ofed_install/ofed/mlnxofedinstall --without-fw-update $mlnxofed_options
mv "${installroot}/bin/uname.nouse" "${installroot}/bin/uname"
rm -rf $installroot/tmp/ofed_install
umount $installroot/dev/
umount $installroot/proc/

View File

@ -53,7 +53,7 @@ d-i partman/early_command string \
rm /tmp/devs-with-boot 2>/dev/null || true; \
else \
DEV=`ls /dev/disk/by-path/* -l | egrep -o '/dev.*sd[^0-9]$' | sort -t : -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -g | head -n1 | egrep -o 'sd.*$'`; \
if [[ $DEV == "" ]]; then DEV="sda"; fi; \
if [[ "$DEV" == "" ]]; then DEV="sda"; fi; \
echo "/dev/$DEV" > /tmp/boot_disk; \
fi; \
debconf-set partman-auto/disk "$(cat /tmp/boot_disk)"

View File

@ -18,7 +18,7 @@ d-i netcfg/dhcp_timeout string 120
d-i mirror/country string manual
d-i mirror/protocol string http
d-i mirror/http/directory string /install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch#
d-i mirror/http/directory string #INCLUDE_OSIMAGE_PKGDIR#
d-i mirror/http/proxy string
# Suite to install.
@ -37,7 +37,26 @@ d-i partman-md/device_remove_md boolean true
#create the /tmp/partitioning based on the uefi or legacy bios
d-i partman/early_command string \
debconf-set partman-auto/disk "$(list-devices disk | head -n1)"
set -x; \
rm /tmp/devs-with-boot 2>/dev/null || true; \
for d in $(list-devices partition); do \
mkdir -p /tmp/mymount; \
rc=0; \
mount $d /tmp/mymount || rc=$?; \
if [[ $rc -eq 0 ]]; then \
[[ -d /tmp/mymount/boot ]] && echo $d >>/tmp/devs-with-boot; \
umount /tmp/mymount; \
fi \
done; \
if [[ -e /tmp/devs-with-boot ]]; then \
head -n1 /tmp/devs-with-boot | egrep -o '\S+[^0-9]' > /tmp/boot_disk; \
rm /tmp/devs-with-boot 2>/dev/null || true; \
else \
DEV=`ls /dev/disk/by-path/* -l | egrep -o '/dev.*sd[^0-9]$' | sort -t : -k 1 -k 2 -k 3 -k 4 -k 5 -k 6 -k 7 -k 8 -g | head -n1 | egrep -o 'sd.*$'`; \
if [[ "$DEV" == "" ]]; then DEV="sda"; fi; \
echo "/dev/$DEV" > /tmp/boot_disk; \
fi; \
debconf-set partman-auto/disk "$(cat /tmp/boot_disk)"
d-i partman-auto/expert_recipe_file string /tmp/partitioning
# This makes partman automatically partition without confirmation, provided

View File

@ -2,7 +2,7 @@ bash
nfs-common
openssl
isc-dhcp-client
linux-image-server
linux-image-generic
openssh-server
openssh-client
wget

View File

@ -21,7 +21,7 @@ profile=$4
workdir=$5
#-- Example how /etc/fstab can be automatically generated during image generation:
#cat <<END >$installroot/etc/fstab
cat <<END >$installroot/etc/fstab
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
@ -29,7 +29,7 @@ sysfs /sys sysfs defaults 0 0
tmpfs /tmp tmpfs defaults 0 2
tmpfs /var/tmp tmpfs defaults 0 2
compute_ppc64el / tmpfs rw 0 1
#END
END
#-- Uncomment the line contains "cons" in /etc/inittab

View File

@ -64,6 +64,7 @@ my $permission; # the permission works only for statelite mode currently
my $tempfile;
my $prompt;
my $noupdate;
my $kernelimage;
sub xdie {
@ -211,7 +212,7 @@ unless ($onlyinitrd) {
if ($kernelver) {
find(\&isaptdir, <$kerneldir/>);
if (!grep /$kerneldir/, @aptdirs) {
print "The repository for $kerneldir should be created before running the geniamge. Try to run [createrepo $kerneldir].\n";
print "The repository for $kerneldir should be created before running the genimage.\n";
}
}
unless (scalar(@aptdirs)) {
@ -315,6 +316,9 @@ unless ($onlyinitrd) {
}
push @npa, $kernelname;
}
elsif ($p =~ /linux-image-generic/) {
$kernelimage = "linux-image-generic";
}
elsif ($p =~ /^@/) {
push @npa, "\"$p\"";
}
@ -471,6 +475,13 @@ unless ($onlyinitrd) {
#my $aptgetcmd_update = $yumcmd_base . " upgrade ";
my $aptgetcmd_update = $aptgetcmd . "&&". $aptgetcmdby . " upgrade ";
$rc = system("$aptgetcmd_update");
if ($kernelimage) {
if ($kernelver) {
$kernelimage = "linux-image-".$kernelver;
}
my $aptgetcmd_install = $aptgetcmd . "&&". $aptgetcmdby. " install --no-install-recommends ".$kernelimage;
$rc = system("$aptgetcmd_install");
}
print("Umount /proc, /dev, /sys, pkgdir and otherpkgdir to the rootimg.\n");
umount_chroot($rootimg_dir);
# ignore any return code

View File

@ -86,7 +86,7 @@ sub usage
-U: when -U is specified, only code updates can trigger the regression.\n
-V: log and message in verbose mode.\n
-e: <email_addr> send the test result to email_addr\n";
print " xCATreg [-?|-h]\n";
print " xCATreg [--help|-h]\n";
print " xCATreg [-f configure file] [-b branch] [-m mangement node][-V][-e] install mn \n";
print " xCATreg [-f configure file] [-b branch] [-m mangement node ] [-U][-V][-e] if code updates there will be regression.\n";
print "\n";
@ -1530,7 +1530,7 @@ send_msg(2,"........................");
#######################################
send_msg(2, "step 0, initializing...............");
if (
!GetOptions("h|?" => \$needhelp,
!GetOptions("h|help" => \$needhelp,
"f=s" => \$configfile,
"b=s" => \$branch,
"m=s" => \$management_node,

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
cd `dirname $0`
if [ ! -d repos/$OSVER/$ARCH ]; then
logger -t xcat -p local4.err "addsiteyum: repos/$OSVER/$ARCH is not a directory"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#This script will invoke the config_chef_client directly.
#If the chef-server and chef-client are installed successfully at first,

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html

View File

@ -22,7 +22,7 @@ if [ "$arch" = "x86_64" ]; then
efibootmgr -c -l \\EFI\\redhat\\grubx64.efi -L syscloneLinux
boot_root=`mount | grep -E ' on\s+/ type ' | awk '{print $1}'`
sed -i 's| root=\S*| root='$boot_root'|' /boot/efi/EFI/redhat/grub.cfg
sed -i 's| root=\S*| root='$boot_root' net.ifnames=0|' /boot/efi/EFI/redhat/grub.cfg
blkid -c /dev/null |grep UUID|while read str_line
do
@ -129,7 +129,7 @@ elif [ "$arch" = "ppc64" ]; then
dd if=/boot/grub2/grub of=/dev/sda1 bs=4096
boot_root=`mount | grep -E ' on\s+/ type ' | awk '{print $1}'`
sed -i 's| root=UUID=\S*| root='$boot_root'|' /boot/grub2/grub.cfg
sed -i 's| root=UUID=\S*| root='$boot_root' net.ifnames=0|' /boot/grub2/grub.cfg
blkid -c /dev/null |grep UUID|while read str_line
do

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
# Internal script used by confignics only
# xCAT post script for configuring ib adapters.

View File

@ -2,4 +2,15 @@
#modify the grub.cfg to prevent nic consistent network renameing
grep -E -q "net.ifnames=0" /etc/sysconfig/grub || sed -i '/^GRUB_CMDLINE_LINUX=.*/{s/"$/ net.ifnames=0"/}' /etc/sysconfig/grub
grep -E -q "net.ifnames=0" /etc/default/grub || sed -i '/^GRUB_CMDLINE_LINUX=.*/{s/"$/ net.ifnames=0"/}' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
if [ -f "/boot/efi/EFI/redhat/grub.cfg" ];then
GRUB_CFG_FILE="/boot/efi/EFI/redhat/grub.cfg"
#elif [ -f "/boot/efi/efi/SuSE/elilo.efi" ];then
elif [ -f "/boot/grub2/grub.cfg" ];then
GRUB_CFG_FILE="/boot/grub2/grub.cfg"
elif [ -f "/boot/grub/grub.cfg" ];then
GRUB_CFG_FILE="/boot/grub/grub.cfg"
fi
grub2-mkconfig -o "$GRUB_CFG_FILE"

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
#####################################################
#=head1 install_chef_client

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
#####################################################
#=head1 install_chef_server

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
#####################################################
#=head1 install_chef_client

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2010 EPL license http://www.eclipse.org/legal/epl-v10.html
#-------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#-------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#(C)IBM Corp
# This script adds xCAT specific setup to the /etc/ssh/sshd_config and ssh_config file

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2010 EPL license http://www.eclipse.org/legal/epl-v10.html
#(C)IBM Corp

View File

@ -47,7 +47,7 @@ fi
# create a script that will launch the first time ESX does and configure
# the network
cat >/tmp/esxcfg.sh <<EOF1
#!/bin/sh
#!/bin/bash
# Configure ESX Server. You'll need to put your own IP address
# in here. We assume eth0 is your nic. Change if needed.
NIC=eth0

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#
#---------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
#
# This postscript sets up a scratch area on the local disk for stateless

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2013 EPL license http://www.eclipse.org/legal/epl-v10.html
#------------------------------------------------------------------------------
#

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#-------------------------------------------------------------------------------

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#(C)IBM Corp
#

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#################################################################
#

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
#(C)IBM Corp
# This scripts transfers the cfgloc files and the xCAT credentials from