From f2c2410f3a59b4d3cb610fc226744236b1f56066 Mon Sep 17 00:00:00 2001 From: ligc Date: Wed, 12 Dec 2012 02:52:42 +0000 Subject: [PATCH] fix for bug 3235: check ipv6 only for Linux, not AIX git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14624 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 10 ++++++---- xCAT-server/sbin/xcatd | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index f29e4d67e..c3293ccf1 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -25,10 +25,12 @@ if ($inet6support) { $inet6support = eval { require IO::Socket::SSL; IO::Socket::SSL->import('inet6'); 1;}; } -# Is IPv6 enabled on the MN or xCAT client at all? -my $ipv6enabled = `ip addr | grep inet6`; -if (!$ipv6enabled) { - $inet6support = 0; +if ($^O =~ /^linux/i) { + # Is IPv6 enabled on the MN or xcat client node at all? + my $ipv6enabled = `ip addr | grep inet6`; + if (!$ipv6enabled) { + $inet6support = 0; + } } unless ($inet6support) { diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 70b9ff1cb..78945ca77 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -65,10 +65,12 @@ if ($inet6support) { $inet6support = eval { require IO::Socket::SSL; IO::Socket::SSL->import('inet6'); 1; }; } -# Is IPv6 enabled on the MN or SN at all? -my $ipv6enabled = `ip addr | grep inet6`; -if (!$ipv6enabled) { - $inet6support = 0; +if ($^O =~ /^linux/i) { + # Is IPv6 enabled on the MN or SN at all? + my $ipv6enabled = `ip addr | grep inet6`; + if (!$ipv6enabled) { + $inet6support = 0; + } } unless ($inet6support) {