diff --git a/xCAT/postscripts/db2install b/xCAT/postscripts/db2install index f505638ff..85cd3f397 100755 --- a/xCAT/postscripts/db2install +++ b/xCAT/postscripts/db2install @@ -34,12 +34,8 @@ BEGIN # if AIX - make sure we include perl 5.8.2 in INC path. # Needed to find perl dependencies shipped in deps tarball. -if ($^O =~ /^aix/i) -{ - use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/5.8.2"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2"; +if ($^O =~ /^aix/i) { + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/xCAT/postscripts/odbcsetup b/xCAT/postscripts/odbcsetup index 9a4fbc288..71ab5e501 100755 --- a/xCAT/postscripts/odbcsetup +++ b/xCAT/postscripts/odbcsetup @@ -23,12 +23,8 @@ BEGIN # if AIX - make sure we include perl 5.8.2 in INC path. # Needed to find perl dependencies shipped in deps tarball. -if ($^O =~ /^aix/i) -{ - use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/5.8.2"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2"; +if ($^O =~ /^aix/i) { + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/xCAT/postscripts/servicenode b/xCAT/postscripts/servicenode index 7530a5f32..a8e181d2c 100755 --- a/xCAT/postscripts/servicenode +++ b/xCAT/postscripts/servicenode @@ -40,10 +40,7 @@ BEGIN # if AIX - make sure we include perl 5.8.2 in INC path. # Needed to find perl dependencies shipped in deps tarball. if ($^O =~ /^aix/i) { - use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/5.8.2"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use lib "$::XCATROOT/lib/perl"; diff --git a/xCAT/postscripts/xcataixpost b/xCAT/postscripts/xcataixpost index a4f6e5f18..53a5ead06 100755 --- a/xCAT/postscripts/xcataixpost +++ b/xCAT/postscripts/xcataixpost @@ -15,11 +15,9 @@ # if AIX - make sure we include perl 5.8.2 in INC path. # Needed to find perl dependencies shipped in deps tarball. if ($^O =~ /^aix/i) { - use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/5.8.2"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } + use strict; use File::Path; use IO::Socket; diff --git a/xCAT/postscripts/xcataixscript b/xCAT/postscripts/xcataixscript index be1c4f01b..51951fe2b 100644 --- a/xCAT/postscripts/xcataixscript +++ b/xCAT/postscripts/xcataixscript @@ -9,10 +9,7 @@ # if AIX - make sure we include perl 5.8.2 in INC path. # Needed to find perl dependencies shipped in deps tarball. if ($^O =~ /^aix/i) { - use lib "/usr/opt/perl5/lib/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/5.8.2"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi"; - use lib "/usr/opt/perl5/lib/site_perl/5.8.2"; + unshift(@INC, qw(/usr/opt/perl5/lib/5.8.2/aix-thread-multi /usr/opt/perl5/lib/5.8.2 /usr/opt/perl5/lib/site_perl/5.8.2/aix-thread-multi /usr/opt/perl5/lib/site_perl/5.8.2)); } use File::Path;