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

This commit is contained in:
GONG Jie 2015-03-13 16:30:10 +08:00
commit f6ea4a1bbc
14 changed files with 187 additions and 105 deletions

View File

@ -49,7 +49,7 @@ ZVMLINK="xCAT-client xCAT xCATsn"
# xCAT-server has PCM specific configuration - RESTAPI(perl-JSON)
# xCAT-client has PCM specific configuration - getxcatdocs(perl-JSON)
PCMBUILD="xCAT xCAT-server xCAT-client xCATsn"
PCMLINK="perl-xCAT xCAT-buildkit xCAT-genesis-scripts-x86_64"
PCMLINK="perl-xCAT xCAT-buildkit xCAT-genesis-scripts-x86_64 xCAT-genesis-scripts-ppc64 xCAT-vlan"
# Note: for FSM, the FlexCAT rpm is built separately from gsa/git
FSMBUILD="perl-xCAT xCAT-client xCAT-server"
FSMLINK=""
@ -85,21 +85,19 @@ if [ "$OSNAME" != "AIX" ]; then
echo "Can't get lock /var/lock/xcatbld-$REL.lock. Someone else must be doing a build right now. Exiting...."
exit 1
fi
export HOME=/root # This is so rpm and gpg will know home, even in sudo
# This is so rpm and gpg will know home, even in sudo
export HOME=/root
fi
# for the git case, query the current branch and set REL (changing master to devel if necessary)
function setbranch {
#git checkout $BRANCH
#REL=`git rev-parse --abbrev-ref HEAD`
REL=`git name-rev --name-only HEAD`
if [ "$REL" = "master" ]; then
REL="devel"
fi
}
if [ "$REL" = "xcat-core" ]; then # using git
if [ "$REL" = "xcat-core" ]; then # using git
GIT=1
setbranch # this changes the REL variable
fi
@ -131,7 +129,7 @@ fi
XCATCORE="xcat-core" # core-snap is a sym link to xcat-core
if [ "$GIT" = "1" ]; then # using git - need to include REL in the path where we put the built rpms
if [ "$GIT" = "1" ]; then # using git - need to include REL in the path where we put the built rpms
DESTDIR=../../$REL$EMBEDDIR/$XCATCORE
else
DESTDIR=../..$EMBEDDIR/$XCATCORE
@ -184,7 +182,8 @@ fi
# If they have not given us a premade update file, do an svn update or git pull and capture the results
SOMETHINGCHANGED=0
if [ "$GIT" = "1" ]; then # using git
if [ "$GIT" = "1" ]; then
# using git
if [ -z "$GITUP" ]; then
GITUP=../coregitup
echo "git pull > $GITUP"
@ -198,7 +197,8 @@ if [ "$GIT" = "1" ]; then # using git
if ! $GREP 'Already up-to-date' $GITUP; then
SOMETHINGCHANGED=1
fi
else # using svn
else
# using svn
GIT=0
if [ -z "$SVNUP" ]; then
SVNUP=../coresvnup
@ -242,7 +242,6 @@ fi
# Build the rest of the noarch rpms
for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xCAT-buildkit xCAT-SoftLayer xCAT-vlan xCAT-confluent; do
#if [ "$EMBED" = "zvm" -a "$rpmname" != "xCAT-server" -a "$rpmname" != "xCAT-UI" ]; then continue; fi # for zvm embedded env only need to build server and UI
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-buildkit" ]; then continue; fi # do not build xCAT-buildkit on aix
if [ "$OSNAME" = "AIX" -a "$rpmname" = "xCAT-SoftLayer" ]; then continue; fi # do not build xCAT-softlayer on aix
@ -253,7 +252,8 @@ for rpmname in xCAT-client xCAT-server xCAT-IBMhpc xCAT-rmc xCAT-UI xCAT-test xC
maker $rpmname
fi
if [ "$OSNAME" = "AIX" ]; then
if [ "$rpmname" = "xCAT-client" -o "$rpmname" = "xCAT-server" ]; then # we do not automatically install the rest of the rpms on AIX
if [ "$rpmname" = "xCAT-client" -o "$rpmname" = "xCAT-server" ]; then
# we do not automatically install the rest of the rpms on AIX
echo "rpm -Uvh $rpmname-$SHORTSHORTVER*rpm" >> $DESTDIR/instxcat
fi
fi
@ -281,9 +281,7 @@ if [ "$OSNAME" != "AIX" ]; then
fi
# Build the xCAT and xCATsn rpms for all platforms
#for rpmname in xCAT xCATsn xCAT-OpenStack xCAT-OpenStack-baremetal; do
for rpmname in xCAT xCATsn; do
#if [ "$EMBED" = "zvm" ]; then break; fi
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # used to be: if $GREP -E "^[UAD] +$rpmname/" $GITUP; then
UPLOAD=1

View File

@ -1261,6 +1261,13 @@ sub gen_chain_for_profiles{
unless ($netprofileattr){
return (1, "Can not get attributes for network profile $netprofile");
}
# Get node's netboot attribute
my ($retcode, $retval) = xCAT::ProfiledNodeUtils->get_netboot_attr($imgprofile, $hwprofile);
if (not $retcode) {
return (1, $retval);
}
my $netboot = $retval;
$final_chain = 'osimage='.$provmethod.":--noupdateinitrd";
# get the chain attribute from hardwareprofile and insert it to node.
@ -1273,7 +1280,8 @@ sub gen_chain_for_profiles{
}
}
#run bmcsetups.
if ((exists $netprofileattr->{"bmc"}) and $hw_reconfig){
#PowerNV nodes can't use 'runcmd=bmcsetup' to set BMC.
if ((exists $netprofileattr->{"bmc"}) and $hw_reconfig and $netboot ne 'petitboot'){
if (index($final_chain, "runcmd=bmcsetup") == -1){
$final_chain = 'runcmd=bmcsetup,'.$final_chain.':reboot4deploy';
}
@ -1343,7 +1351,6 @@ sub get_netboot_attr{
{
return 0, "Hardware profile not defined in DB."
}
$hardwareprofile =~ s/^__HardwareProfile_//;
}
else
{
@ -1376,16 +1383,28 @@ sub get_netboot_attr{
{
$os_arch = 'x86_64';
}
# Identify whether this node is PowerKVM or PowerNV if os arch is ppc64le
# If hardware profile is defined
my $mgt = '*';
if ($os_arch eq 'ppc64le' and $hardwareprofile ne '*') {
my $nodehmtab = xCAT::Table->new('nodehm');
my $nodehmtab_entry = $nodehmtab->getNodeAttribs($hardwareprofile, ['mgt']);
if (defined $nodehmtab_entry->{'mgt'}) {
$mgt = $nodehmtab_entry->{'mgt'};
}
}
# Rule for netboot attribute.If update the rule,just update %netboot_dict and @condition_array
# It's sequence sensitive: os arch -> os name -> os major version -> hardware profile
# Priority | Arch | OS Name | OS Major Version | Hardware Profile | Noderes.netboot |
# 1 | x86_64/x86 | * | * | * | xnba |
# 2 | ppc64 | rhels | 7 | * | grub2 |
# 3 | | * | * | * | yaboot |
# 4 | ppc64le/el | * | * | IBM_PowerNV | petiboot |
# 5 | | * | * | * | grub2 |
# arch osname version hardware netboot
# Priority | Arch | OS Name | OS Major Version | Management method | Noderes.netboot |
# 1 | x86_64/x86 | * | * | * | xnba |
# 2 | ppc64 | rhels | 7 | * | grub2 |
# 3 | | * | * | * | yaboot |
# 4 | ppc64le/el | * | * | * | grub2
# 4 | ppc64le/el | * | * | ipmi | petitboot
# arch osname version hardware netboot
my %netboot_dict = ( 'x86_64' => 'xnba',
'ppc64' => {
'rhels' => {
@ -1397,20 +1416,20 @@ sub get_netboot_attr{
'ppc64le' => {
'*' => {
'*' => {
'IBM_PowerNV' => 'petiboot',
'*' => 'grub2',
'*' => 'grub2',
'ipmi' => 'petitboot',
},
},
},
);
my $condition_array_ref = [$os_arch, $os_name, $os_major_version, $hardwareprofile];
my $condition_array_ref = [$os_arch, $os_name, $os_major_version, $mgt];
$netboot = cal_netboot(\%netboot_dict, $condition_array_ref);
if($netboot eq '0')
{
return 0, "Can not get the netboot attribute";
}
else
{
{
return 1, $netboot;
}
}

View File

@ -3710,7 +3710,7 @@ push(@{$defspec{group}->{'attrs'}}, @nodeattrs);
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
},
{attr_name => 'kitreponame',
tabentry => 'kitcomponent.kitrepoid',
tabentry => 'kitcomponent.kitreponame',
access_tabentry => 'kitcomponent.kitcompname=attr:kitcompname',
},
{attr_name => 'basename',

View File

@ -1346,16 +1346,16 @@ sub addkit
} else {
$rc = system("cp -rf $kitdir/other_files/$_ $installdir/postscripts/");
}
if($rc && !-e "$installdir/postscripts/$_"){
my %rsp;
push@{ $rsp{data} }, "Failed to copy scripts from $kitdir/scripts/ to $installdir/postscripts";
xCAT::MsgUtils->message( "E", \%rsp, $callback );
return 1;
}
$rc = 0;
chmod(0755,"$installdir/postscripts/$_");
}
if($rc){
my %rsp;
push@{ $rsp{data} }, "Failed to copy scripts from $kitdir/scripts/ to $installdir/postscripts";
xCAT::MsgUtils->message( "E", \%rsp, $callback );
return 1;
}
# Copying plugins to /opt/xcat/lib/perl/xCAT_plugin/
if ( -d "$kitdir/plugins/" ) {
@ -2748,9 +2748,13 @@ sub rmkitcomp
my %newosikitcomponents;
foreach my $allosikitcomp (@allosikitcomps) {
if ( $allosikitcomp->{kitcomponents} and $allosikitcomp->{imagename} ) {
(my $allosiotherpkgdir) = $tabs{linuximage}->getAttribs({imagename=> $allosikitcomp->{imagename}}, 'otherpkgdir');
my @allkitcomps = split /,/, $allosikitcomp->{kitcomponents};
foreach my $allkitcomp ( @allkitcomps ) {
if ( $allosikitcomp->{imagename} ne $osimage or $allkitcomp ne $kitcomponent ) {
if ( (($allosikitcomp->{imagename} ne $osimage) and
($allosiotherpkgdir->{otherpkgdir} eq $otherpkgdir))
or ($allkitcomp ne $kitcomponent) ) {
$newosikitcomponents{$allkitcomp} = 1;
}
}

View File

@ -462,7 +462,7 @@ sub set_sources {
my @kernel_rpms = ();
if ($ou_entry->{'basename'} =~ /^ubuntu/)
{
@kernel_rpms = `find $dirpath/pool/main/l/linux/ -name *.deb`;
@kernel_rpms = `find $dirpath/pool/main/l/linux/ -name *deb`;
}
else
{
@ -511,7 +511,7 @@ sub set_sources {
my @kernel_rpms = ();
if ($od_entry->{'basename'} =~ /ubuntu/)
{
@kernel_rpms = `find $dirpath/pool/main/l/linux/ -name *.deb`;
@kernel_rpms = `find $dirpath/pool/main/l/linux/ -name *deb`;
}
else
{
@ -532,7 +532,7 @@ sub set_sources {
my @kernel_rpms = ();
if ($od_entry->{'basename'} =~ /ubuntu/)
{
@kernel_rpms = `find $dirpath/pool/main/l/linux/ -name *.deb`;
@kernel_rpms = `find $dirpath/pool/main/l/linux/ -name *deb`;
}
else
{

View File

@ -839,6 +839,14 @@ Usage:
if(exists $args_dict{'hardwareprofile'}){
$hardwareprofile = $args_dict{'hardwareprofile'};
}
# Get the netboot attribute for node
my ($retcode, $retval) = xCAT::ProfiledNodeUtils->get_netboot_attr($imageprofile, $hardwareprofile);
if (not $retcode) {
setrsp_errormsg($retval);
return;
}
my $new_netboot = $retval;
# After checking, all nodes' profile should be same
# Get the new profile with specified ones in args_dict
@ -879,13 +887,7 @@ Usage:
setrsp_infostr("Warning: no profile changes detect.");
return;
}
# Get the netboot attribute for node
my ($retcode, $retval) = xCAT::ProfiledNodeUtils->get_netboot_attr($imageprofile, $hardwareprofile);
if (not $retcode) {
setrsp_errormsg($retval);
return;
}
my $new_netboot = $retval;
# Update nodes' attributes
foreach (@$nodes) {
$updatenodeshash{$_}{'groups'} .= $profile_groups;

View File

@ -46,7 +46,15 @@ if [ -z "$PRINIC" ]
then
for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do
if [ "${karg%%=*}" = "BOOTIF" ]; then
export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'`
#export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'`
export PRINIC=${karg#*=01:}
export PRINIC=`ip -o link|grep -i "$PRINIC"|awk '{print $2}'|sed s/://`
fi
if [ "${karg%%=*}" = "netdevice" ]; then
export PRINIC="${karg#*=}";
if [ "${#PRINIC}" = "20" ]; then
export PRINIC=${PRINIC:3:21}
fi
fi
done
if [ -z "$PRINIC" ]; then
@ -57,7 +65,8 @@ if [ -z "$PRINIC" ]
then
export PRINIC=eth0
elif [[ `echo "$PRINIC" | grep -sqE ^[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+$ ;echo $?` == "0" ]]; then
export PRINIC=`ifconfig -a | grep -i "HWaddr $PRINIC" | awk '{print $1}'`
#export PRINIC=`ifconfig -a | grep -i "HWaddr $PRINIC" | awk '{print $1}'`
export PRINIC=`ip -o link|grep -i "$PRINIC"|awk '{print $2}'|sed s/://`
fi
echo 'export PRINIC='"$PRINIC" > /mnt/tmp/prinicsetting
]]>

View File

@ -6,4 +6,8 @@ do
if ethtool $nicname|grep -E -i "Link detected.*yes" >/dev/null 2>&1
then sed -i 's/ONBOOT=no/ONBOOT=yes/' $i
fi
#remove the entry 'HWADDR' from ifcfg-ethx, this is used to skip the
#nic name change during the install and first_reboot
sed -i '/HWADDR/d' $i
done

View File

@ -0,0 +1,15 @@
bash
nfs-common
openssl
isc-dhcp-client
libc-bin
linux-image-generic-lts-utopic
openssh-server
openssh-client
wget
vim
ntp
rsync
busybox-static
gawk
dnsutils

View File

@ -280,15 +280,11 @@ unless ($onlyinitrd) {
my @line=split(" ",`ls -lh $installroot/$osver/$arch/dists/ | grep dr`);
my $dist = $line[@line-1];
# my $aptgetcmd = "chroot $rootimg_dir apt-get update && chroot $rootimg_dir apt-get $non_interactive ";
# If there is env in otherpkg list
# apt-get update and apt-get install should be added env param
my $aptgetcmd = "chroot $rootimg_dir apt-get update";
my $aptgetcmdby="chroot $rootimg_dir apt-get $non_interactive ";
my $aptcachecmd = "chroot $rootimg_dir apt-get update && chroot $rootimg_dir apt-cache $non_interactive ";
# If there is env in otherpkg list
# apt-get update and apt-get install should be added env param
my $aptgetcmd = "DEBIAN_FRONTEND=noninteractive chroot $rootimg_dir apt-get update";
my $aptgetcmdby = "DEBIAN_FRONTEND=noninteractive chroot $rootimg_dir apt-get $non_interactive ";
my $aptcachecmd = "DEBIAN_FRONTEND=noninteractive chroot $rootimg_dir apt-get update && chroot $rootimg_dir apt-cache $non_interactive ";
my $aptcmd1 = "debootstrap";
#my $aptcmd2 = "--arch $uarch $dist $rootimg_dir file://$installroot/$osver/$arch/";
my $aptcmd2;
@ -320,6 +316,10 @@ unless ($onlyinitrd) {
print "Error: cannnot create bootstraps for rootimage. Make sure you specified full http mirror path.\n";
exit 1;
}
# Since kernel-image package needs the /proc/cpuinfo file to validate the cpu type,
# copy the /proc/cpuinfo from host node
copy("/proc/cpuinfo", "$rootimg_dir/proc/cpuinfo");
# Prepare the installation mirror for the package install
print("Mount /proc, /dev, /sys, pkgdir and otherpkgdir to the rootimg.\n");
@ -580,6 +580,31 @@ unless ($onlyinitrd) {
postscripts(); #run 'postscripts'
}
#-- run postinstall script
unless ($imagename) {
$postinstall_filename= imgutils::get_profile_def_filename($osver, $profile, $arch, $customdir, "postinstall");
unless ($postinstall_filename) {
$postinstall_filename= imgutils::get_profile_def_filename($osver, $profile, $arch, $pathtofiles, "postinstall");
}
}
if ( $postinstall_filename ) {
$updates{'postinstall'} = $postinstall_filename if ($tempfile);
foreach my $postinstall ( split /,/, $postinstall_filename ) {
if ( !-x $postinstall ) {
print "postinstall script $postinstall is not executable\n";
exit 1;
}
my $rc = system($postinstall, $rootimg_dir,$osver,$arch,$profile);
if($rc) {
print "postinstall script $postinstall failed\n";
exit 1;
}
}
}
# Default to the first kernel found in the install image if nothing specified explicitly.
# A more accurate guess than whatever the image build server happens to be running
# If specified, that takes precedence.
@ -664,31 +689,6 @@ if (-d "$rootimg_dir/usr/share/dracut") {
print "Enter the dracut mode. Dracut version: $dracutver. Dracut directory: $dracutdir.\n";
}
#-- run postinstall script
unless ($imagename) {
$postinstall_filename= imgutils::get_profile_def_filename($osver, $profile, $arch, $customdir, "postinstall");
unless ($postinstall_filename) {
$postinstall_filename= imgutils::get_profile_def_filename($osver, $profile, $arch, $pathtofiles, "postinstall");
}
}
if ( $postinstall_filename ) {
$updates{'postinstall'} = $postinstall_filename if ($tempfile);
foreach my $postinstall ( split /,/, $postinstall_filename ) {
if ( !-x $postinstall ) {
print "postinstall script $postinstall is not executable\n";
exit 1;
}
my $rc = system($postinstall, $rootimg_dir,$osver,$arch,$profile);
if($rc) {
print "postinstall script $postinstall failed\n";
exit 1;
}
}
}
# all the attributes have been gathered
# now, update the linuximage and osimage tables
# TODO: do statelite and stateless share the same attributes?

View File

@ -165,7 +165,7 @@ sub xCATreg_init{
#init important attributes
$date = `date +"%Y%m%d"`;
$date = `date +"%Y%m%d"`;
chomp($date);
&runcmd("mkdir -p $logfiledir") if(! -e $logfiledir);
@ -1031,29 +1031,13 @@ sub git_update{
return 0;
}
xCATreg_init();
###############################################################
# Mainfunction
###############################################################
send_msg(2,"........................");
send_msg(2,"........................");
send_msg(2,".....ooooO..............");
send_msg(2,"....(....)....Ooooo.....");
send_msg(2,".....\\..(.....(....)....");
send_msg(2,"......\\__).....)../.....");
send_msg(2,"..............(_ /......");
send_msg(2,"........................");
send_msg(2,".........START .........");
send_msg(2,"........................");
#######################################
# step 0. Parse input arguments
#######################################
send_msg(2, "step 1, Parse input arguments............");
=pod
if (
!GetOptions("h|?" => \$needhelp,
!GetOptions("--help|h|?" => \$needhelp,
"f=s" => \$configfile,
"b=s" => \$branch,
"m=s" => \$management_node,
@ -1063,7 +1047,7 @@ if (
)
=cut
if (
!GetOptions("h|?" => \$needhelp,
!GetOptions("--help|h|?" => \$needhelp,
"f=s" => \$configfile,
"b=s" => \$branch,
"m=s" => \$management_node,
@ -1081,6 +1065,22 @@ if ($needhelp)
exit 0;
}
xCATreg_init();
###############################################################
# Mainfunction
###############################################################
send_msg(2,"........................");
send_msg(2,"........................");
send_msg(2,".....ooooO..............");
send_msg(2,"....(....)....Ooooo.....");
send_msg(2,".....\\..(.....(....)....");
send_msg(2,"......\\__).....)../.....");
send_msg(2,"..............(_ /......");
send_msg(2,"........................");
send_msg(2,".........START .........");
send_msg(2,"........................");
#######################################
# step 1. Read configuration files
#######################################

View File

@ -68,8 +68,6 @@ ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/rmvlan
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsvlan
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/chvlanports
set -x
%clean
# This step does not happen until *after* the %files packaging below

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash
# IBM(c) 2014 EPL license http://www.eclipse.org/legal/epl-v10.html
# Internal script used by confignics only.
# It configs the Ethernet adpaters on the node
@ -502,6 +502,21 @@ elif [ "$1" = "-s" ];then
str_inst_ip=`grep fixed-address $str_lease_file | tail -n 1 | awk '{print $2}' | sed 's/;$//'`
str_inst_mask=`grep subnet-mask $str_lease_file | tail -n 1 | awk '{print $3}' | sed 's/;$//'`
str_inst_gateway=`grep routers $str_lease_file | tail -n 1 | awk '{print $3}' | sed 's/;$//'`
else
if [ -n "$MACADDRESS" ];then
str_inst_mac=$MACADDRESS
inst_nic=`ip -o link |grep -i ${str_inst_mac} |awk '{print $2}'|sed 's/://g'`
if [ ! -z "${inst_nic}" ];then
str_inst_ip=`ip -4 -o addr|grep -i ${inst_nic} |awk '{print $4}'|awk -F/ '{print $1}'`
if [ ! -z "str_inst_ip" ];then
inst_ip_pre=`ip ro ls|grep -i ${str_inst_ip}|awk '{print $1}'|awk -F/ '{print $1}'`
if [ ! -z "inst_ip_pre" ];then
str_inst_mask=`route |grep ${inst_ip_pre}|awk '{print $3}'|head -1`
fi
fi
fi
str_inst_gateway=`ip ro ls|grep default|awk '{print $3}'|head -1`
fi
fi
elif [ -f "/etc/SuSE-release" ];then
str_lease_file="/var/lib/dhcpcd/dhcpcd-"$str_inst_nic".info"
@ -516,6 +531,21 @@ elif [ "$1" = "-s" ];then
str_inst_ip=`grep fixed-address $str_lease_file | tail -n 1 | awk '{print $2}' | sed 's/;$//'`
str_inst_mask=`grep subnet-mask $str_lease_file | tail -n 1 | awk '{print $3}' | sed 's/;$//'`
str_inst_gateway=`grep routers $str_lease_file | tail -n 1 | awk '{print $3}' | sed 's/;$//'`
else
if [ -n "$MACADDRESS" ];then
str_inst_mac=$MACADDRESS
inst_nic=`ip -o link |grep -i ${str_inst_mac} |awk '{print $2}'|sed 's/://g'`
if [ ! -z "${inst_nic}" ];then
str_inst_ip=`ip -4 -o addr|grep -i ${inst_nic} |awk '{print $4}'|awk -F/ '{print $1}'`
if [ ! -z "str_inst_ip" ];then
inst_ip_pre=`ip ro ls|grep -i ${str_inst_ip}|awk '{print $1}'|awk -F/ '{print $1}'`
if [ ! -z "inst_ip_pre" ];then
str_inst_mask=`route |grep ${inst_ip_pre}|awk '{print $3}'|head -1`
fi
fi
fi
str_inst_gateway=`ip ro ls|grep default|awk '{print $3}'|head -1`
fi
fi
fi
if [ -n "$MACADDRESS" ];then

View File

@ -217,6 +217,8 @@ fi
splitconfig "$NICIPS"
splitconfig "$NICCUSTOMSCRIPTS"
if [ $boot_myscript -eq 1 ];then
. $str_dir_name/$myscript
if [ $? -ne 0 ];then
@ -273,9 +275,11 @@ if [ $bool_remove -eq 1 ];then
configeth -r $str_temp_nic
done
fi
old_ifs=$IFS
IFS=$' '
if [ $bool_cfg_inst_nic -eq 1 ];then
str_all_nics=$str_all_nics" "$str_inst_nic
fi
array_nics_temp=($str_all_nics)
IFS=$old_ifs
for key in ${array_nics_temp[@]}
@ -341,7 +345,6 @@ do
fi
fi
done
if [ -n "$str_ib_nics" ];then
logger -t xcat -p local4.info "confignics: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports"
echo "confignics on $NODE: executed script: configib for nics: $str_ib_nics, ports: $num_iba_ports"