* Removing 'test.pl' from git.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 4 years ago
parent 827a3f2ee4
commit 1ec03c9718
  1. 6
      scancore-agents/scan-apc-ups/scan-apc-ups
  2. 32
      tools/test.pl

@ -701,9 +701,9 @@ INSERT INTO
$ups_changed = 1; $ups_changed = 1;
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { ups_changed => $ups_changed }}); $anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { ups_changed => $ups_changed }});
### NOTE: This used to be 'warning' level, but it caused way too many ### NOTE: This used to be 'warning' level, but it caused way too many false
### false alarms. If a serious issue arises, the input voltage ### alarms. If a serious issue arises, the input voltage will trigger a
### will trigger a 'warning' level alert. ### 'warning' level alert.
### There are 10 possible states ### There are 10 possible states
# 0 - There is no information on when the UPS last transferred to battery. # 0 - There is no information on when the UPS last transferred to battery.
# 1 - The UPS has not transferred to battery power since the last time it booted. # 1 - The UPS has not transferred to battery power since the last time it booted.

@ -1,32 +0,0 @@
#!/usr/bin/perl
#
use strict;
use warnings;
use Anvil::Tools;
use Data::Dumper;
my $THIS_FILE = ($0 =~ /^.*\/(.*)$/)[0];
my $running_directory = ($0 =~ /^(.*?)\/$THIS_FILE$/)[0];
if (($running_directory =~ /^\./) && ($ENV{PWD}))
{
$running_directory =~ s/^\./$ENV{PWD}/;
}
# Turn off buffering so that the pinwheel will display while waiting for the SSH call(s) to complete.
$| = 1;
my $anvil = Anvil::Tools->new();
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0115", variables => { program => $THIS_FILE }});
# Read switches (target ([user@]host[:port]) and the file with the target's password.
$anvil->Get->switches;
# Connect to the database(s).
$anvil->Database->connect({debug => 3});
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 2, key => "log_0132"});
my ($minor, $tcp_port) = $anvil->DRBD->get_next_resource({debug => 2});
print "Next free minor: [".$minor."], tcp port: [".$tcp_port."]\n";
$anvil->nice_exit({exit_code => 0});
Loading…
Cancel
Save