mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-10-28 17:32:35 +00:00
firemod: Attempt to fix INC path issue.
On my system that does not have the directory /home/lanforge/scripts, the lf_firemod.pl would fail saying it cannot find Net::Telnet, even though it is installed. The problem turns out to be that if you have "use lib foo" and foo does not exist, or is not readable, then perl craps out immediately instead of trying other places in @INC. I think this 'use if' logic fixes that issue based on internet reading. It fixes the issue on my system, but I'm not certain it works properly on systems that do depend on /home/lanforge/scripts/ existing, so that will need some more testing. Signed-off-by: Ben Greear <greearb@candelatech.com>
This commit is contained in:
@@ -18,7 +18,7 @@ $| = 1;
|
||||
|
||||
# use lib prepends to @INC, so put lower priority first
|
||||
# This is before run-time, so cannot condition this with normal 'if' logic.
|
||||
use lib '/home/lanforge/scripts';
|
||||
use if (-e "/home/lanforge/scripts"), lib => "/home/lanforge/scripts";
|
||||
use lib "../";
|
||||
use lib "./";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user