From 27abfa4c2332eb9ba361d1b7d833fb5d93fd81ea Mon Sep 17 00:00:00 2001 From: mellor Date: Tue, 29 Jul 2014 11:55:46 -0400 Subject: [PATCH] defect 4229 replace xcatd reload with call to new rescanplugins in kit add and kit remove for xCAT 2.9 only --- xCAT-server/lib/xcat/plugins/kit.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/kit.pm b/xCAT-server/lib/xcat/plugins/kit.pm index 85ea8122b..5f01a8db4 100644 --- a/xCAT-server/lib/xcat/plugins/kit.pm +++ b/xCAT-server/lib/xcat/plugins/kit.pm @@ -12,6 +12,7 @@ BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; } +use lib "$::XCATROOT/lib/perl"; use xCAT::Table; use xCAT::Utils; @@ -1410,9 +1411,10 @@ sub addkit xCAT::MsgUtils->message( "I", \%rsp, $callback ); if ( $hasplugin ) { - # Issue xcatd reload to load the new plugins - #system("/etc/init.d/xcatd restart"); - system("XCATRELOAD=yes xcatd -p /var/run/xcatd.pid"); + # Issue rescanplugins to have xcatd load the new plugins + xCAT::Utils->runxcmd( { command => ['rescanplugins'],}, + $request_command, 0,1); + } } } @@ -1731,9 +1733,9 @@ sub rmkit xCAT::MsgUtils->message( "I", \%rsp, $callback ); if ( $hasplugin ) { - # Issue xcatd reload to load the new plugins - #system("/etc/init.d/xcatd restart"); - system("XCATRELOAD=yes xcatd -p /var/run/xcatd.pid"); + # Issue rescanplugins to have xcatd load the new plugins + xCAT::Utils->runxcmd( { command => ['rescanplugins'],}, + $request_command, 0,1); } }