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) {