diff --git a/mkAIXsnap b/mkAIXsnap index a3e92e925..a381309bf 100755 --- a/mkAIXsnap +++ b/mkAIXsnap @@ -44,7 +44,7 @@ fi # # do an update from the trunk directory level # -svn update | tee $BLDTOP/coresvnup +#svn update | tee $BLDTOP/coresvnup #svn update # create a simple install script diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index ecb6d10bb..a0af61389 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -510,18 +510,29 @@ sub thishostisnot { # TODO: AIX will hang on the inet_aton call if it gets passed an IPv6 # address, since we have not added INET6 support to AIX yet. # The ifconfig -a output may contain an IPv6 address for localhost. -# This code should only get called if using hierarchy, which -# is also not supported for AIX yet. +# This code should only get called if using hierarchy #### my $comp=IO::Socket::inet_aton($comparison); foreach (@ips) { - if (/^\s*inet/) { - my @ents = split(/\s+/); - my $ip=$ents[2]; - $ip =~ s/\/.*//; - if (IO::Socket::inet_aton($ip) eq $comp) { - return 0; - } + if (xCAT::Utils->isAIX()) { + # don't want "inet6" entry - causes error in inet_aton + if (/^\s*inet\s+/) { + my @ents = split(/\s+/); + my $ip=$ents[2]; + $ip =~ s/\/.*//; + if (IO::Socket::inet_aton($ip) eq $comp) { + return 0; + } + } + } else { + if (/^\s*inet/) { + my @ents = split(/\s+/); + my $ip=$ents[2]; + $ip =~ s/\/.*//; + if (IO::Socket::inet_aton($ip) eq $comp) { + return 0; + } + } } } return 1; diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index bbef28a63..dc2e86937 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -949,14 +949,26 @@ sub thishostisnot { return 1; } foreach (@ips) { - if (/^\s*inet/) { - my @ents = split(/\s+/); - my $ip=$ents[2]; - $ip =~ s/\/.*//; - if (inet_aton($ip) and inet_aton($ip) eq $comp) { - return 0; - } - #print Dumper(inet_aton($ip)); + if (xCAT::Utils->isAIX()) { + # don't want "inet6" entry - causes error in inet_aton + if (/^\s*inet\s+/) { + my @ents = split(/\s+/); + my $ip=$ents[2]; + $ip =~ s/\/.*//; + if (inet_aton($ip) and inet_aton($ip) eq $comp) { + return 0; + } + } + } else { + if (/^\s*inet/) { + my @ents = split(/\s+/); + my $ip=$ents[2]; + $ip =~ s/\/.*//; + if (inet_aton($ip) and inet_aton($ip) eq $comp) { + return 0; + } + } + #print Dumper(inet_aton($ip)); } } return 1;