diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 91c3f61d2..820c8508b 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -8,6 +8,9 @@ BEGIN my $inet6support; $inet6support=eval { require Socket6 }; +if ($^O =~ /^aix/i) { + $inet6support = 0; +} if ($inet6support) { $inet6support = eval { require IO::Socket::INET6 }; } diff --git a/xCAT-rmc/resources/node/IBM.Sensor/ErrorLogSensor.pm b/xCAT-rmc/resources/node/IBM.Sensor/ErrorLogSensor.pm index 295bef685..0b3dc9735 100644 --- a/xCAT-rmc/resources/node/IBM.Sensor/ErrorLogSensor.pm +++ b/xCAT-rmc/resources/node/IBM.Sensor/ErrorLogSensor.pm @@ -1,12 +1,7 @@ #!/usr/bin/perl -BEGIN -{ - $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; -} - $RES::Sensor{'ErrorLogSensor'} = { Name => q(ErrorLogSensor), - Command => "$::XCATROOT/sbin/rmcmon/monerrorlog", + Command => "/etc/xcat/rmcmon/scripts/monerrorlog", UserName => q(root), RefreshInterval => q(60), ControlFlags => q(4), diff --git a/xCAT-rmc/xCAT-rmc.spec b/xCAT-rmc/xCAT-rmc.spec index 8af84ebe1..179b2b2ea 100644 --- a/xCAT-rmc/xCAT-rmc.spec +++ b/xCAT-rmc/xCAT-rmc.spec @@ -33,6 +33,8 @@ rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/rmc mkdir -p $RPM_BUILD_ROOT/%{prefix}/sbin/rmcmon mkdir -p $RPM_BUILD_ROOT/install/postscripts +mkdir -p $RPM_BUILD_ROOT/install/post/xcat/rmcmon/resources +mkdir -p $RPM_BUILD_ROOT/install/post/xcat/rmcmon/scripts cp plugin/* $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring cp -r resources $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_monitoring/rmc @@ -43,6 +45,18 @@ chmod 755 $RPM_BUILD_ROOT/%{prefix}/sbin/rmcmon/* cp scripts/configrmcnode $RPM_BUILD_ROOT/install/postscripts chmod 755 $RPM_BUILD_ROOT/install/postscripts/configrmcnode +FILES_TO_COPY=`cat scripts/scripts_to_node|tr '\n' ' '` +echo "files=$FILES_TO_COPY" +for file in $FILES_TO_COPY +do + echo "file=$file" + cp scripts/$file $RPM_BUILD_ROOT/install/post/xcat/rmcmon/scripts +done +chmod 755 $RPM_BUILD_ROOT/install/post/xcat/rmcmon/scripts/* + +cp -r resources/node/* $RPM_BUILD_ROOT/install/post/xcat/rmcmon/resources + + %clean rm -rf $RPM_BUILD_ROOT @@ -52,6 +66,7 @@ rm -rf $RPM_BUILD_ROOT %defattr(-, root, root) %{prefix} /install/postscripts +/install/post/xcat/rmcmon %changelog diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 18673092b..355c6669e 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -32,6 +32,9 @@ my $plugin_numchildren=0; my %plugin_children; my $inet6support; $inet6support=eval { require Socket6 }; +if ($^O =~ /^aix/i) { + $inet6support = 0; +} if ($inet6support) { $inet6support = eval { require IO::Socket::INET6 }; }