use thishostisnot to check if the conserver specified in nodehm is mn or not in conserver.pm

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1523 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
linggao 2008-05-29 18:53:37 +00:00
parent 0ea24ff6f9
commit a72bc97ef4

View File

@ -22,7 +22,7 @@ my $usage_string=
-h|--help Display this usage statement.
-v|--version Display the version number.";
my $version_string="Version 2.0";
my $version_string="Version 2.0";
sub handled_commands {
return {
@ -368,12 +368,12 @@ sub donodeent {
if (grep(/^$cmeth$/,@cservers)) {
push @$content," include ".$cfgent->{termserver}.";\n";
push @$content," port ".$cfgent->{termport}.";\n";
if ((!$isSN) && ($cfgent->{conserver})) { # let the master handle it
if ((!$isSN) && ($cfgent->{conserver}) && xCAT::Utils->thishostisnot($cfgent->{conserver})) { # let the master handle it
push @$content," master ".$cfgent->{conserver}.";\n";
}
} else { #a script method...
push @$content," type exec;\n";
if ((!$isSN) && ($cfgent->{conserver})) { # let the master handle it
if ((!$isSN) && ($cfgent->{conserver}) && xCAT::Utils->thishostisnot($cfgent->{conserver})) { # let the master handle it
push @$content," master ".$cfgent->{conserver}.";\n";
} else { # handle it here
my $locerror = $isSN ? "PERL_BADLANG=0 " : ''; # on service nodes, often LC_ALL is not set and perl complains