mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-30 19:02:27 +00:00 
			
		
		
		
	modify the getipaddr so that it would not warning when can't find the according hostname of a IP.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8400 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
		| @@ -151,7 +151,9 @@ sub gethostname() | ||||
|                 return undef; | ||||
|             } | ||||
|             my $hostname = gethostbyaddr(inet_aton($iporhost), AF_INET); | ||||
|             $hostname =~ s/\..*//; #short hostname | ||||
|             if ( $hostname ) {             | ||||
|                 $hostname =~ s/\..*//; #short hostname | ||||
|             } | ||||
|             return $hostname; | ||||
|         } | ||||
|      } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user