diff --git a/Netdisco/Changes b/Netdisco/Changes index 4af8e52f..6f4686a5 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,9 @@ +2.008001 - 2013-06-11 + + [BUG FIXES] + + * more fixes for localenv discovery in scripts + 2.008000 - 2013-06-09 [BUG FIXES] diff --git a/Netdisco/META.yml b/Netdisco/META.yml index da6c4e11..0656075b 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -60,4 +60,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.008000 +version: 2.008001 diff --git a/Netdisco/bin/netdisco-daemon b/Netdisco/bin/netdisco-daemon index 53b7c3e8..f34b537b 100755 --- a/Netdisco/bin/netdisco-daemon +++ b/Netdisco/bin/netdisco-daemon @@ -6,11 +6,10 @@ use warnings FATAL => 'all'; our $home; BEGIN { - # try really hard to find a localenv if one isn't already in place. + # try to find a localenv if one isn't already in place. $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); - eval "require App::Netdisco::Util::Noop"; - if ($@) { + if (!exists $ENV{PERL_LOCAL_LIB_ROOT}) { use File::Spec; my $localenv = File::Spec->catfile($FindBin::RealBin, 'localenv'); exec($localenv, $0, @ARGV) if -f $localenv; diff --git a/Netdisco/bin/netdisco-deploy b/Netdisco/bin/netdisco-deploy index 395d7cc2..5a237517 100755 --- a/Netdisco/bin/netdisco-deploy +++ b/Netdisco/bin/netdisco-deploy @@ -5,9 +5,8 @@ our $home; BEGIN { # try really hard to find a localenv if one isn't already in place. $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); - eval "require App::Netdisco::Util::Noop"; - if ($@) { + if (!exists $ENV{PERL_LOCAL_LIB_ROOT}) { use File::Spec; my $localenv = File::Spec->catfile($FindBin::RealBin, 'localenv'); exec($localenv, $0, @ARGV) if -f $localenv; diff --git a/Netdisco/bin/netdisco-do b/Netdisco/bin/netdisco-do index d8b1019d..c6d2ba4b 100755 --- a/Netdisco/bin/netdisco-do +++ b/Netdisco/bin/netdisco-do @@ -3,11 +3,10 @@ our $home; BEGIN { - # try really hard to find a localenv if one isn't already in place. + # try to find a localenv if one isn't already in place. $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); - eval "require App::Netdisco::Util::Noop"; - if ($@) { + if (!exists $ENV{PERL_LOCAL_LIB_ROOT}) { use File::Spec; my $localenv = File::Spec->catfile($FindBin::RealBin, 'localenv'); exec($localenv, $0, @ARGV) if -f $localenv; @@ -119,7 +118,7 @@ exit ($status eq 'done' ? 0 : 1); =head1 NAME -netdisco-do - Run any Netdisco poller job from the command-line. +netdisco-do - Run any Netdisco job from the command-line. =head1 USAGE diff --git a/Netdisco/bin/netdisco-web b/Netdisco/bin/netdisco-web index 9c86eb78..6818cbe1 100755 --- a/Netdisco/bin/netdisco-web +++ b/Netdisco/bin/netdisco-web @@ -6,11 +6,10 @@ use warnings FATAL => 'all'; our $home; BEGIN { - # try really hard to find a localenv if one isn't already in place. + # try to find a localenv if one isn't already in place. $home = ($ENV{NETDISCO_HOME} || $ENV{HOME}); - eval "require App::Netdisco::Util::Noop"; - if ($@) { + if (!exists $ENV{PERL_LOCAL_LIB_ROOT}) { use File::Spec; my $localenv = File::Spec->catfile($FindBin::RealBin, 'localenv'); exec($localenv, $0, @ARGV) if -f $localenv; diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 48a69061..79fce419 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -7,7 +7,7 @@ use 5.010_000; use File::ShareDir 'dist_dir'; use Path::Class; -our $VERSION = '2.008000'; +our $VERSION = '2.008001'; BEGIN { if (not length ($ENV{DANCER_APPDIR} || '')