mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	Avoid inet6 check for AIX in thishostisnot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2364 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user