mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
lf_generic_ping.pl: fixes old utils telnet call, uses new connect() method
Signed-off-by: Jed Reynolds <jed@bitratchet.com>
This commit is contained in:
@@ -137,7 +137,7 @@ if (@ARGV < 2) {
|
||||
GetOptions
|
||||
(
|
||||
'mgr|m=s' => \$::lfmgr_host,
|
||||
'mgr_port|p=i' => \$lfmgr_port,
|
||||
'mgr_port|p=i' => \$::lfmgr_port,
|
||||
'resource|r=i' => \$::resource,
|
||||
'quiet|q' => \$::quiet,
|
||||
'verbose|v' => \$::verbose,
|
||||
@@ -174,16 +174,11 @@ if (defined $log_cli) {
|
||||
}
|
||||
}
|
||||
}
|
||||
our $t = new Net::Telnet(Prompt => '/default\@btbits\>\>/',
|
||||
Timeout => 20);
|
||||
$t->open(Host => $lfmgr_host,
|
||||
Port => $lfmgr_port,
|
||||
Timeout => 10);
|
||||
$t->waitfor("/btbits\>\>/");
|
||||
|
||||
# Configure our utils.
|
||||
our $utils = new LANforge::Utils();
|
||||
$utils->telnet($t); # Set our telnet object.
|
||||
$::utils->connect($lfmgr_host, $lfmgr_port);
|
||||
# $utils->telnet($t); # Set our telnet object.
|
||||
|
||||
if ($utils->isQuiet()) {
|
||||
if (defined $ENV{'LOG_CLI'} && $ENV{'LOG_CLI'} ne "") {
|
||||
|
||||
Reference in New Issue
Block a user