Merge branch '2.8' of ssh://git.code.sf.net/p//xcat/xcat-core into 2.8
This commit is contained in:
commit
a00a818197
@ -86,7 +86,7 @@ if [ "$c_flag" -a "$d_flag" ];then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
uploader="bp-sawyers"
|
||||
uploader="ligc"
|
||||
# Find where this script is located to set some build variables
|
||||
old_pwd=`pwd`
|
||||
cd `dirname $0`
|
||||
@ -279,7 +279,7 @@ __EOF__
|
||||
cat << '__EOF__' > mklocalrepo.sh
|
||||
. /etc/lsb-release
|
||||
cd `dirname $0`
|
||||
echo deb file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-core.list
|
||||
echo deb [arch=amd64] file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-core.list
|
||||
__EOF__
|
||||
|
||||
chmod 775 mklocalrepo.sh
|
||||
@ -380,7 +380,7 @@ __EOF__
|
||||
cat << '__EOF__' > mklocalrepo.sh
|
||||
. /etc/lsb-release
|
||||
cd `dirname $0`
|
||||
echo deb file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-dep.list
|
||||
echo deb [arch=amd64] file://"`pwd`" $DISTRIB_CODENAME main > /etc/apt/sources.list.d/xcat-dep.list
|
||||
__EOF__
|
||||
|
||||
chmod 775 mklocalrepo.sh
|
||||
|
@ -105,11 +105,6 @@ sub subvars {
|
||||
}
|
||||
|
||||
|
||||
my @managedaddressmode = xCAT::TableUtils->get_site_attribute("managedaddressmode");
|
||||
my $tmp=$managedaddressmode[0];
|
||||
if( defined($tmp) ){
|
||||
$ENV{MANAGEDADDRESSMODE}=$tmp;
|
||||
}
|
||||
|
||||
#replace the env with the right value so that correct include files can be found
|
||||
$inc =~ s/#ENV:([^#]+)#/envvar($1)/eg;
|
||||
@ -248,6 +243,7 @@ sub subvars {
|
||||
$inc =~ s/#WINDISABLENULLADMIN#/windows_disable_null_admin()/eg;
|
||||
$inc =~ s/#MANAGEDADDRESSMODE#/managed_address_mode()/eg;
|
||||
$inc =~ s/#HOSTNAME#/$node/g;
|
||||
$inc =~ s/#GETNODEDOMAIN:([^#]+)#/get_node_domain($1)/eg;
|
||||
|
||||
my $nrtab = xCAT::Table->new("noderes");
|
||||
my $tftpserver = $nrtab->getNodeAttribs($node, ['tftpserver']);
|
||||
@ -619,6 +615,22 @@ sub get_win_prodkey {
|
||||
sub managed_address_mode {
|
||||
return $::XCATSITEVALS{managedaddressmode};
|
||||
}
|
||||
|
||||
|
||||
sub get_node_domain {
|
||||
my $lcnode=shift;
|
||||
if ( $lcnode eq 'THISNODE' ){
|
||||
$lcnode=$node;
|
||||
}
|
||||
|
||||
my $nd = xCAT::NetworkUtils->getNodeDomains([$lcnode]);
|
||||
my %nodedomains = %$nd;
|
||||
my $domain=$nodedomains{$lcnode};
|
||||
|
||||
return $domain;
|
||||
|
||||
}
|
||||
|
||||
sub esxipv6setup {
|
||||
if (not $::XCATSITEVALS{managedaddressmode} or $::XCATSITEVALS{managedaddressmode} =~ /v4/) { return ""; } # blank line for ipv4 schemes
|
||||
my $v6addr;
|
||||
@ -686,7 +698,7 @@ sub kickstartnetwork {
|
||||
push @nameserversIP, $ip;
|
||||
|
||||
}
|
||||
|
||||
#there is no network option to set dns search domain in kickstart, it will be set in %post
|
||||
if (scalar @nameserversIP) {
|
||||
$line .=" --nameserver=". join(",",@nameserversIP);
|
||||
}
|
||||
|
@ -884,10 +884,15 @@ sub check_options
|
||||
# if not help and not -n, dhcpd needs to be running
|
||||
if (!($opt->{h})&& (!($opt->{n}))) {
|
||||
if (xCAT::Utils->isLinux()) {
|
||||
my @output = xCAT::Utils->runcmd("service dhcpd status", -1);
|
||||
my $DHCPSERVER="dhcpd";
|
||||
if( -e "/etc/init.d/isc-dhcp-server" ){
|
||||
$DHCPSERVER="isc-dhcp-server";
|
||||
}
|
||||
|
||||
my @output = xCAT::Utils->runcmd("service $DHCPSERVER status", -1);
|
||||
if ($::RUNCMD_RC != 0) { # not running
|
||||
my $rsp = {};
|
||||
$rsp->{data}->[0] = "dhcpd is not running. Run service dhcpd start and rerun your command.";
|
||||
$rsp->{data}->[0] = "$DHCPSERVER is not running. Run service $DHCPSERVER start and rerun your command.";
|
||||
xCAT::MsgUtils->message("E", $rsp, $callback, 1);
|
||||
return 1;
|
||||
}
|
||||
|
@ -612,7 +612,25 @@ sub rflash {
|
||||
# run the cmd on the host to flash the mic
|
||||
my @args = ("-s", "-v", "-e");
|
||||
push @args, "$::XCATROOT/sbin/flashmic";
|
||||
my $master = $request->{'_xcatdest'};
|
||||
# assume that all hosts are on the same network connected to this master
|
||||
# (otherwise, will need to move this call into loop above for each host
|
||||
# and build separate miccfg calls for each unique returned value from
|
||||
# my_ip_facing)
|
||||
my $ipfn = xCAT::NetworkUtils->my_ip_facing(@hosts[0]);
|
||||
if ($ipfn) {
|
||||
$master = $ipfn;
|
||||
} else {
|
||||
my $hostname = "";
|
||||
my $hostnamecmd = "/bin/hostname";
|
||||
my @thostname = xCAT::Utils->runcmd($hostnamecmd, 0);
|
||||
if ($::RUNCMD_RC = 0) {
|
||||
$hostname = "from server $thostname[0]";
|
||||
}
|
||||
xCAT::MsgUtils->message("E", {error=>["Cannot detect an active network interface $hostname to @hosts[0]."], errorcode=>["1"]}, $callback);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
push @args, ("-m", "$master");
|
||||
push @args, ("-p", "$tftpdir/xcat/miccfg");
|
||||
|
||||
@ -912,7 +930,23 @@ sub nodeset {
|
||||
# run the cmd on the host to configure the mic
|
||||
my @args = ("-s", "-v", "-e");
|
||||
push @args, "$::XCATROOT/sbin/configmic";
|
||||
my $master = $request->{'_xcatdest'};
|
||||
# assume that all hosts are on the same network connected to this master
|
||||
# (otherwise, will need to move this call into loop above for each host
|
||||
# and build separate miccfg calls for each unique returned value from
|
||||
# my_ip_facing)
|
||||
my $ipfn = xCAT::NetworkUtils->my_ip_facing(@hosts[0]);
|
||||
if ($ipfn) {
|
||||
$master = $ipfn;
|
||||
} else {
|
||||
my $hostname = "";
|
||||
my $hostnamecmd = "/bin/hostname";
|
||||
my @thostname = xCAT::Utils->runcmd($hostnamecmd, 0);
|
||||
if ($::RUNCMD_RC = 0) {
|
||||
$hostname = "from server $thostname[0]";
|
||||
}
|
||||
xCAT::MsgUtils->message("E", {error=>["Cannot detect an active network interface $hostname to @hosts[0]."], errorcode=>["1"]}, $callback);
|
||||
return;
|
||||
}
|
||||
push @args, ("-m", "$master");
|
||||
push @args, ("-p", "$tftpdir/xcat/miccfg");
|
||||
|
||||
|
@ -1183,11 +1183,19 @@ sub mkinstall
|
||||
}
|
||||
|
||||
if(scalar @nameserversIP){
|
||||
$kcmdline .=" dns=".join(",",@nameserversIP);
|
||||
$kcmdline .=" Nameserver=".join(",",@nameserversIP);
|
||||
}
|
||||
|
||||
my $nd = xCAT::NetworkUtils->getNodeDomains([$node]);
|
||||
my %nodedomains = %$nd;
|
||||
my $domain=$nodedomains{$node};
|
||||
|
||||
$kcmdline .=" Domain=$domain ";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (defined $sent->{serialport})
|
||||
{
|
||||
|
@ -2,6 +2,7 @@
|
||||
#cmdline
|
||||
|
||||
lang en_US
|
||||
#KICKSTARTNET#
|
||||
|
||||
#
|
||||
# Where's the source?
|
||||
|
@ -3,6 +3,7 @@
|
||||
#cmdline
|
||||
|
||||
lang en_US
|
||||
#KICKSTARTNET#
|
||||
|
||||
#
|
||||
# Where's the source?
|
||||
|
@ -2,6 +2,8 @@
|
||||
# Setup hostname
|
||||
#
|
||||
echo "post scripts" >/root/post.log
|
||||
|
||||
|
||||
export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic#
|
||||
if [ "$PRINIC" == "mac" ]
|
||||
then
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
export MANAGEDADDRESSMODE="#XCATVAR:MANAGEDADDRESSMODE#"
|
||||
export MANAGEDADDRESSMODE=#MANAGEDADDRESSMODE#
|
||||
|
||||
cd /etc/sysconfig/network
|
||||
|
||||
|
@ -14,6 +14,17 @@ if [ -r /tmp/updates/etc/pki/tls/certs/ca-bundle.crt ]; then
|
||||
fi
|
||||
|
||||
|
||||
#there is no boot option to set dns search domain in kickstart file,
|
||||
#the search domain in /etc/resolv.conf is set in the pre installation script
|
||||
export MANAGEDADDRESSMODE=#MANAGEDADDRESSMODE#
|
||||
export SEARCHDOMAIN=#GETNODEDOMAIN:THISNODE#
|
||||
|
||||
if [ "$MANAGEDADDRESSMODE" == "static" ]; then
|
||||
echo "#appended by %pre " >> /etc/resolv.conf
|
||||
echo "search $SEARCHDOMAIN" >> /etc/resolv.conf
|
||||
fi
|
||||
|
||||
|
||||
|
||||
cat >/tmp/baz.py <<EOF
|
||||
#!/usr/bin/python
|
||||
|
@ -5,4 +5,5 @@ install/prescripts
|
||||
install/kdump
|
||||
opt/xcat/share/xcat
|
||||
etc/apache2/conf.d
|
||||
etc/apache2/conf-enabled
|
||||
opt/xcat/share/doc/packages/xCAT
|
||||
|
@ -1,5 +1,5 @@
|
||||
xcat.conf etc/apache2/conf.d/
|
||||
xcat.conf.apach24 etc/apache2/conf.d/
|
||||
xcat.conf.apach24 etc/apache2/conf-enabled
|
||||
LICENSE.html opt/xcat/share/doc/packages/xCAT
|
||||
postscripts/* install/postscripts/
|
||||
prescripts/* install/prescripts/
|
||||
|
@ -40,12 +40,10 @@ case "$1" in
|
||||
else
|
||||
xcatconfig -i -d -s
|
||||
fi
|
||||
ver=$(cat /etc/issue |awk '{print $2}')
|
||||
num=${ver%.*}
|
||||
file="xcat.conf.apach24"
|
||||
if [ $num -gt 12 ];then
|
||||
mv /etc/apache2/conf.d/xcat.conf.apach24 /etc/apache2/conf-enabled/xcat.conf
|
||||
fi
|
||||
|
||||
# [ -e /etc/apache2/conf-enabled/xcat.conf ] && rm /etc/apache2/conf-enabled/xcat.conf
|
||||
# mv /etc/apache2/conf-enabled/xcat.conf.apach24 /etc/apache2/conf-enabled/xcat.conf
|
||||
|
||||
/etc/init.d/apache2 restart
|
||||
;;
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
# Change these two parameters according to your requirements
|
||||
$::NFSRETRIES = 3;
|
||||
$::NFSTIMEO = 10;
|
||||
$::NFSTIMEO = 50;
|
||||
|
||||
# Candidate commands: mount, df, lsfs, nfs4cl showfs
|
||||
# Only the mount command could list all file systems
|
||||
|
Loading…
Reference in New Issue
Block a user