make xcatd tolerant of syntax errors in plugins, fixed syntax error in conserver.pm
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4611 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
7e3bec91ed
commit
beffdd517f
@ -197,7 +197,7 @@ sub scan_plugins {
|
||||
foreach (@plugins) {
|
||||
/.*\/([^\/]*).pm$/;
|
||||
my $modname = $1;
|
||||
require "$_";
|
||||
unless (eval { require "$_" }) { print "Error loading module $_ ...skipping\n"; next;}
|
||||
no strict 'refs';
|
||||
my $cmd_adds=${"xCAT_plugin::".$modname."::"}{handled_commands}->();
|
||||
foreach (keys %$cmd_adds) {
|
||||
|
@ -165,6 +165,7 @@ sub preprocess_request {
|
||||
my $rsp;
|
||||
$rsp->{data}->[0] = "In preprocess_request, request is " . Dumper(@requests);
|
||||
xCAT::MsgUtils->message("I", $rsp, $callback);
|
||||
}
|
||||
}
|
||||
return \@requests;
|
||||
}
|
||||
|
@ -433,7 +433,11 @@ sub scan_plugins {
|
||||
foreach (@plugins) {
|
||||
/.*\/([^\/]*).pm$/;
|
||||
my $modname = $1;
|
||||
require "$_";
|
||||
unless ( eval { require "$_" }) {
|
||||
xCAT::MsgUtils->message("S","Error loading module ".$_." ...skipping");
|
||||
|
||||
next;
|
||||
}
|
||||
no strict 'refs';
|
||||
my $cmd_adds=${"xCAT_plugin::".$modname."::"}{handled_commands}->();
|
||||
foreach (keys %$cmd_adds) {
|
||||
|
Loading…
Reference in New Issue
Block a user