From edaba6aae6373b5aa4e715dfaae55bb0d2eac1c8 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Sun, 26 Sep 2010 02:57:37 +0000 Subject: [PATCH] /install is hard coded in gangliamon.pm and rmcmon.pm git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7645 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-rmc/plugin/rmcmon.pm | 7 ++++--- xCAT-server/lib/xcat/monitoring/gangliamon.pm | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/xCAT-rmc/plugin/rmcmon.pm b/xCAT-rmc/plugin/rmcmon.pm index f0e949057..8ba7d0aac 100644 --- a/xCAT-rmc/plugin/rmcmon.pm +++ b/xCAT-rmc/plugin/rmcmon.pm @@ -1156,7 +1156,8 @@ sub addNodes { #let updatenode command to handle the normal nodes as a bulk if (@normal_nodes>0) { - my $nr=join(',',@normal_nodes); + my $nr=join(',',@normal_nodes); + my $install_root = xCAT::Utils->getInstallDir(); #get the fanout value my %settings=xCAT_monitoring::monitorctrl->getPluginSettings("rmcmon"); @@ -1182,12 +1183,12 @@ sub addNodes { my $nr = join(',', @{$servernodes{$snkey}}); my $cmd; if (xCAT::Utils->isLinux()) { - $cmd="XCATBYPASS=Y $fanout_string $::XCATROOT/bin/xdsh $nr -s -e /install/postscripts/xcatdsklspost 2 -m $snkey configrmcnode 2>&1"; + $cmd="XCATBYPASS=Y $fanout_string $::XCATROOT/bin/xdsh $nr -s -e $install_root/postscripts/xcatdsklspost 2 -m $snkey configrmcnode 2>&1"; print "$cmd\n"; } else { #use -c 2 here to tell xcataixpost that there is only one postscript, download only it. It applies to AIX only - $cmd="XCATBYPASS=Y $fanout_string $::XCATROOT/bin/xdsh $nr -s -e /install/postscripts/xcataixpost -m $snkey -c 2 configrmcnode 2>&1"; + $cmd="XCATBYPASS=Y $fanout_string $::XCATROOT/bin/xdsh $nr -s -e $install_root/postscripts/xcataixpost -m $snkey -c 2 configrmcnode 2>&1"; } if (! open (CMD, "$cmd |")) { reportError("Cannot run command $cmd", $callback); diff --git a/xCAT-server/lib/xcat/monitoring/gangliamon.pm b/xCAT-server/lib/xcat/monitoring/gangliamon.pm index e816ed580..ead295b27 100755 --- a/xCAT-server/lib/xcat/monitoring/gangliamon.pm +++ b/xCAT-server/lib/xcat/monitoring/gangliamon.pm @@ -243,6 +243,7 @@ sub confGmond if ($noderef =~ /xCAT_monitoring::gangliamon/) { $noderef=shift; } + my $scope=shift; my $callback=shift; my $configure_file = ''; @@ -345,6 +346,7 @@ sub confGmond if ($scope) {#opening if scope of confGmond my @children; + my $install_root = xCAT::Utils->getInstallDir(); foreach my $key (keys (%$pPairHash)) { #opening for each my @key_a=split(':', $key); if (! $iphash{$key_a[0]}) { next; } @@ -362,7 +364,7 @@ sub confGmond } #closing foreach2 my $node = join(',',@children); - my $res_cp = `XCATBYPASS=Y $::XCATROOT/bin/xdcp $node /install/postscripts/confGang /tmp 2>&1`; + my $res_cp = `XCATBYPASS=Y $::XCATROOT/bin/xdcp $node $install_root/postscripts/confGang /tmp 2>&1`; if($?) { #openinf if ? if($callback) {