From 21436b9577c83c525e09ad254bb5167161e5fc63 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Thu, 23 Mar 2017 17:32:22 +0800 Subject: [PATCH] fix issue 2727, add Async path to @INC when want to use it (#2730) --- xCAT-server/lib/xcat/plugins/docker.pm | 4 ++++ xCAT-server/lib/xcat/plugins/openbmc.pm | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/docker.pm b/xCAT-server/lib/xcat/plugins/docker.pm index 5b7e16796..3118da70c 100755 --- a/xCAT-server/lib/xcat/plugins/docker.pm +++ b/xCAT-server/lib/xcat/plugins/docker.pm @@ -12,6 +12,10 @@ package xCAT_plugin::docker; BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; + my $async_path = "/usr/local/share/perl5/"; + unless (grep { $_ eq $async_path } @INC) { + push @INC, $async_path; + } } use lib "$::XCATROOT/lib/perl"; diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index 88441b2cf..6a102cd68 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -6,6 +6,10 @@ package xCAT_plugin::openbmc; BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : '/opt/xcat'; + my $async_path = "/usr/local/share/perl5/"; + unless (grep { $_ eq $async_path } @INC) { + push @INC, $async_path; + } } use lib "$::XCATROOT/lib/perl"; use strict;