* Fixed some string and path issues from the 'anvil' merger.
* Added a 'debug' parameter to System->ping() to allow per-call log levels. Signed-off-by: Digimer <digimer@alteeve.ca>
This commit is contained in:
parent
665f2217d9
commit
d03213b860
@ -707,7 +707,7 @@ sub _set_paths
|
|||||||
},
|
},
|
||||||
data => {
|
data => {
|
||||||
group => "/etc/group",
|
group => "/etc/group",
|
||||||
host_uuid => "/etc/an/host.uuid",
|
host_uuid => "/etc/anvil/host.uuid",
|
||||||
passwd => "/etc/passwd",
|
passwd => "/etc/passwd",
|
||||||
},
|
},
|
||||||
directories => {
|
directories => {
|
||||||
|
@ -3843,7 +3843,7 @@ sub _archive_table
|
|||||||
column_count => $column_count
|
column_count => $column_count
|
||||||
}});
|
}});
|
||||||
|
|
||||||
print Dumper $columns;
|
#print Dumper $columns;
|
||||||
|
|
||||||
# See m2's DB->archive_if_needed() for old version of this.
|
# See m2's DB->archive_if_needed() for old version of this.
|
||||||
|
|
||||||
|
@ -351,6 +351,7 @@ sub host_uuid
|
|||||||
|
|
||||||
my $set = defined $parameter->{set} ? $parameter->{set} : "";
|
my $set = defined $parameter->{set} ? $parameter->{set} : "";
|
||||||
|
|
||||||
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { set => $set }});
|
||||||
if ($set)
|
if ($set)
|
||||||
{
|
{
|
||||||
$anvil->data->{HOST}{UUID} = $set;
|
$anvil->data->{HOST}{UUID} = $set;
|
||||||
@ -359,10 +360,11 @@ sub host_uuid
|
|||||||
{
|
{
|
||||||
# Read dmidecode if I am root, and the cache if not.
|
# Read dmidecode if I am root, and the cache if not.
|
||||||
my $uuid = "";
|
my $uuid = "";
|
||||||
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { '$<' => $<, '$>' => $> }});
|
||||||
if (($< == 0) or ($> == 0))
|
if (($< == 0) or ($> == 0))
|
||||||
{
|
{
|
||||||
my $shell_call = $anvil->data->{path}{exe}{dmidecode}." --string system-uuid";
|
my $shell_call = $anvil->data->{path}{exe}{dmidecode}." --string system-uuid";
|
||||||
#print $THIS_FILE." ".__LINE__."; [ Debug ] - shell_call: [$shell_call]\n";
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }});
|
||||||
open(my $file_handle, $shell_call." 2>&1 |") or warn $THIS_FILE." ".__LINE__."; [ Warning ] - Failed to call: [".$shell_call."], the error was: $!\n";
|
open(my $file_handle, $shell_call." 2>&1 |") or warn $THIS_FILE." ".__LINE__."; [ Warning ] - Failed to call: [".$shell_call."], the error was: $!\n";
|
||||||
while(<$file_handle>)
|
while(<$file_handle>)
|
||||||
{
|
{
|
||||||
@ -377,6 +379,7 @@ sub host_uuid
|
|||||||
{
|
{
|
||||||
# Not running as root, so I have to rely on the cache file, or die if it doesn't
|
# Not running as root, so I have to rely on the cache file, or die if it doesn't
|
||||||
# exist.
|
# exist.
|
||||||
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { 'path::data::host_uuid' => $anvil->data->{path}{data}{host_uuid} }});
|
||||||
if (not -e $anvil->data->{path}{data}{host_uuid})
|
if (not -e $anvil->data->{path}{data}{host_uuid})
|
||||||
{
|
{
|
||||||
# We're done.
|
# We're done.
|
||||||
@ -385,6 +388,7 @@ sub host_uuid
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$uuid = $anvil->Storage->read_file({ file => $anvil->data->{path}{data}{host_uuid} });
|
$uuid = $anvil->Storage->read_file({ file => $anvil->data->{path}{data}{host_uuid} });
|
||||||
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { uuid => $uuid }});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -783,6 +783,10 @@ Parameters;
|
|||||||
|
|
||||||
This tells the method how many time to try to ping the target. The method will return as soon as any ping attemp succeeds (unlike pinging from the command line, which always pings the requested count times).
|
This tells the method how many time to try to ping the target. The method will return as soon as any ping attemp succeeds (unlike pinging from the command line, which always pings the requested count times).
|
||||||
|
|
||||||
|
=head3 debug (optional, default '3')
|
||||||
|
|
||||||
|
This is an optional way to alter to level at which this method is logged. Useful when the caller is trying to debug a problem. Generally this can be ignored.
|
||||||
|
|
||||||
=head3 fragment (optional, default '1')
|
=head3 fragment (optional, default '1')
|
||||||
|
|
||||||
When set to C<< 0 >>, the ping will fail if the packet has to be fragmented. This is meant to be used along side C<< payload >> for testing MTU sizes.
|
When set to C<< 0 >>, the ping will fail if the packet has to be fragmented. This is meant to be used along side C<< payload >> for testing MTU sizes.
|
||||||
@ -816,13 +820,14 @@ sub ping
|
|||||||
|
|
||||||
# If we were passed a target, try pinging from it instead of locally
|
# If we were passed a target, try pinging from it instead of locally
|
||||||
my $count = $parameter->{count} ? $parameter->{count} : 1; # How many times to try to ping it? Will exit as soon as one succeeds
|
my $count = $parameter->{count} ? $parameter->{count} : 1; # How many times to try to ping it? Will exit as soon as one succeeds
|
||||||
|
my $debug = $parameter->{debug} ? $parameter->{deug} : 3;
|
||||||
my $fragment = $parameter->{fragment} ? $parameter->{fragment} : 1; # Allow fragmented packets? Set to '0' to check MTU.
|
my $fragment = $parameter->{fragment} ? $parameter->{fragment} : 1; # Allow fragmented packets? Set to '0' to check MTU.
|
||||||
my $password = $parameter->{password} ? $parameter->{password} : "";
|
my $password = $parameter->{password} ? $parameter->{password} : "";
|
||||||
my $payload = $parameter->{payload} ? $parameter->{payload} : 0; # The size of the ping payload. Use when checking MTU.
|
my $payload = $parameter->{payload} ? $parameter->{payload} : 0; # The size of the ping payload. Use when checking MTU.
|
||||||
my $ping = $parameter->{ping} ? $parameter->{ping} : "";
|
my $ping = $parameter->{ping} ? $parameter->{ping} : "";
|
||||||
my $port = $parameter->{port} ? $parameter->{port} : "";
|
my $port = $parameter->{port} ? $parameter->{port} : "";
|
||||||
my $target = $parameter->{target} ? $parameter->{target} : "";
|
my $target = $parameter->{target} ? $parameter->{target} : "";
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
|
||||||
count => $count,
|
count => $count,
|
||||||
fragment => $fragment,
|
fragment => $fragment,
|
||||||
payload => $payload,
|
payload => $payload,
|
||||||
@ -836,22 +841,22 @@ sub ping
|
|||||||
if ($payload)
|
if ($payload)
|
||||||
{
|
{
|
||||||
$payload -= 28;
|
$payload -= 28;
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { payload => $payload }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { payload => $payload }});
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build the call. Note that we use 'timeout' because if there is no connection and the hostname is
|
# Build the call. Note that we use 'timeout' because if there is no connection and the hostname is
|
||||||
# used to ping and DNS is not available, it could take upwards of 30 seconds time timeout otherwise.
|
# used to ping and DNS is not available, it could take upwards of 30 seconds time timeout otherwise.
|
||||||
my $shell_call = $anvil->data->{path}{exe}{timeout}." 2 ".$anvil->data->{path}{exe}{'ping'}." -W 1 -n $ping -c 1";
|
my $shell_call = $anvil->data->{path}{exe}{timeout}." 2 ".$anvil->data->{path}{exe}{'ping'}." -W 1 -n $ping -c 1";
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { shell_call => $shell_call }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { shell_call => $shell_call }});
|
||||||
if (not $fragment)
|
if (not $fragment)
|
||||||
{
|
{
|
||||||
$shell_call .= " -M do";
|
$shell_call .= " -M do";
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { shell_call => $shell_call }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { shell_call => $shell_call }});
|
||||||
}
|
}
|
||||||
if ($payload)
|
if ($payload)
|
||||||
{
|
{
|
||||||
$shell_call .= " -s $payload";
|
$shell_call .= " -s $payload";
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { shell_call => $shell_call }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { shell_call => $shell_call }});
|
||||||
}
|
}
|
||||||
$shell_call .= " || ".$anvil->data->{path}{exe}{echo}." timeout";
|
$shell_call .= " || ".$anvil->data->{path}{exe}{echo}." timeout";
|
||||||
|
|
||||||
@ -859,7 +864,7 @@ sub ping
|
|||||||
my $average_ping_time = 0;
|
my $average_ping_time = 0;
|
||||||
foreach my $try (1..$count)
|
foreach my $try (1..$count)
|
||||||
{
|
{
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { count => $count, try => $try }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { count => $count, try => $try }});
|
||||||
last if $pinged;
|
last if $pinged;
|
||||||
|
|
||||||
my $output = "";
|
my $output = "";
|
||||||
@ -874,24 +879,24 @@ sub ping
|
|||||||
port => $port,
|
port => $port,
|
||||||
password => $password,
|
password => $password,
|
||||||
});
|
});
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { output => $output }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { output => $output }});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
### Local calls
|
### Local calls
|
||||||
$output = $anvil->System->call({shell_call => $shell_call});
|
$output = $anvil->System->call({shell_call => $shell_call});
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { output => $output }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { output => $output }});
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach my $line (split/\n/, $output)
|
foreach my $line (split/\n/, $output)
|
||||||
{
|
{
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { line => $line }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { line => $line }});
|
||||||
if ($line =~ /(\d+) packets transmitted, (\d+) received/)
|
if ($line =~ /(\d+) packets transmitted, (\d+) received/)
|
||||||
{
|
{
|
||||||
# This isn't really needed, but might help folks watching the logs.
|
# This isn't really needed, but might help folks watching the logs.
|
||||||
my $pings_sent = $1;
|
my $pings_sent = $1;
|
||||||
my $pings_received = $2;
|
my $pings_received = $2;
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
|
||||||
pings_sent => $pings_sent,
|
pings_sent => $pings_sent,
|
||||||
pings_received => $pings_received,
|
pings_received => $pings_received,
|
||||||
}});
|
}});
|
||||||
@ -900,7 +905,7 @@ sub ping
|
|||||||
{
|
{
|
||||||
# Contact!
|
# Contact!
|
||||||
$pinged = 1;
|
$pinged = 1;
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { pinged => $pinged }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { pinged => $pinged }});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -912,14 +917,14 @@ sub ping
|
|||||||
if ($line =~ /min\/avg\/max\/mdev = .*?\/(.*?)\//)
|
if ($line =~ /min\/avg\/max\/mdev = .*?\/(.*?)\//)
|
||||||
{
|
{
|
||||||
$average_ping_time = $1;
|
$average_ping_time = $1;
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { average_ping_time => $average_ping_time }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { average_ping_time => $average_ping_time }});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# 0 == Ping failed
|
# 0 == Ping failed
|
||||||
# 1 == Ping success
|
# 1 == Ping success
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => {
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => {
|
||||||
pinged => $pinged,
|
pinged => $pinged,
|
||||||
average_ping_time => $average_ping_time,
|
average_ping_time => $average_ping_time,
|
||||||
}});
|
}});
|
||||||
|
@ -308,6 +308,7 @@ sub read
|
|||||||
$error .= "===========================================================\n";
|
$error .= "===========================================================\n";
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", raw => $error});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", raw => $error});
|
||||||
$return_code = 4;
|
$return_code = 4;
|
||||||
|
die;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -397,11 +398,11 @@ sub string
|
|||||||
# Setup default values
|
# Setup default values
|
||||||
my $key = defined $parameter->{key} ? $parameter->{key} : "";
|
my $key = defined $parameter->{key} ? $parameter->{key} : "";
|
||||||
my $language = defined $parameter->{language} ? $parameter->{language} : $anvil->Words->language;
|
my $language = defined $parameter->{language} ? $parameter->{language} : $anvil->Words->language;
|
||||||
my $file = defined $parameter->{file} ? $parameter->{file} : "";
|
my $file = defined $parameter->{file} ? $parameter->{file} : $anvil->data->{path}{words}{'words.xml'};
|
||||||
my $string = defined $parameter->{string} ? $parameter->{string} : "";
|
my $string = defined $parameter->{string} ? $parameter->{string} : "";
|
||||||
my $variables = defined $parameter->{variables} ? $parameter->{variables} : "";
|
my $variables = defined $parameter->{variables} ? $parameter->{variables} : "";
|
||||||
|
|
||||||
# If we weren't passed a raw string, we'll get the string from our ->key() method, the inject any
|
# If we weren't passed a raw string, we'll get the string from our ->key() method, then inject any
|
||||||
# variables, if needed. This also handles the initial sanity checks. If we get back '#!not_found!#',
|
# variables, if needed. This also handles the initial sanity checks. If we get back '#!not_found!#',
|
||||||
# we'll exit.
|
# we'll exit.
|
||||||
if (not $string)
|
if (not $string)
|
||||||
|
@ -54,13 +54,13 @@ if ($local_id)
|
|||||||
if (not -e $anvil->data->{path}{configs}{'pg_hba.conf'})
|
if (not -e $anvil->data->{path}{configs}{'pg_hba.conf'})
|
||||||
{
|
{
|
||||||
# Failed...
|
# Failed...
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "error_0001"});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0050"});
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
# Initialized!
|
# Initialized!
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "message_0001"});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0055"});
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup postgresql.conf
|
# Setup postgresql.conf
|
||||||
@ -98,7 +98,7 @@ if ($local_id)
|
|||||||
mode => "0600",
|
mode => "0600",
|
||||||
overwrite => 1,
|
overwrite => 1,
|
||||||
});
|
});
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "message_0002", variables => { file => $anvil->data->{path}{configs}{'postgresql.conf'} }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0056", variables => { file => $anvil->data->{path}{configs}{'postgresql.conf'} }});
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup pg_hba.conf now
|
# Setup pg_hba.conf now
|
||||||
@ -140,7 +140,7 @@ if ($local_id)
|
|||||||
mode => "0600",
|
mode => "0600",
|
||||||
overwrite => 1,
|
overwrite => 1,
|
||||||
});
|
});
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "message_0003", variables => { file => $anvil->data->{path}{configs}{'postgresql.conf'} }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0057", variables => { file => $anvil->data->{path}{configs}{'postgresql.conf'} }});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ if ($local_id)
|
|||||||
if ($started)
|
if ($started)
|
||||||
{
|
{
|
||||||
# Started the daemon.
|
# Started the daemon.
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "message_0004"});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 1, key => "log_0059"});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -204,7 +204,7 @@ if ($local_id)
|
|||||||
{
|
{
|
||||||
# User exists already
|
# User exists already
|
||||||
my $id = $1;
|
my $id = $1;
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "message_0005", variables => { user => $scancore_user, id => $id }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "log_0060", variables => { user => $scancore_user, id => $id }});
|
||||||
$create_user = 0;
|
$create_user = 0;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
@ -223,14 +223,14 @@ if ($local_id)
|
|||||||
{
|
{
|
||||||
# Success!
|
# Success!
|
||||||
my $id = $1;
|
my $id = $1;
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "message_0006", variables => { user => $scancore_user, id => $id }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "log_0095", variables => { user => $scancore_user, id => $id }});
|
||||||
$user_exists = 1;
|
$user_exists = 1;
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (not $user_exists)
|
if (not $user_exists)
|
||||||
{
|
{
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "error_0004", variables => { user => $scancore_user }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 0, priority => "err", key => "log_0096", variables => { user => $scancore_user }});
|
||||||
exit(4);
|
exit(4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ if ($local_id)
|
|||||||
if ($line =~ /ALTER ROLE/)
|
if ($line =~ /ALTER ROLE/)
|
||||||
{
|
{
|
||||||
# Password set
|
# Password set
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "message_0007", variables => { user => $user }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "log_0100", variables => { user => $user }});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,6 +18,7 @@ if (($running_directory =~ /^\./) && ($ENV{PWD}))
|
|||||||
}
|
}
|
||||||
|
|
||||||
my $anvil = Anvil::Tools->new();
|
my $anvil = Anvil::Tools->new();
|
||||||
|
print $THIS_FILE." ".__LINE__."; anvil: [".$anvil."]\n";
|
||||||
$anvil->Log->level({set => 2});
|
$anvil->Log->level({set => 2});
|
||||||
|
|
||||||
$anvil->Storage->read_config({file => "/etc/anvil/anvil.conf"});
|
$anvil->Storage->read_config({file => "/etc/anvil/anvil.conf"});
|
||||||
@ -25,6 +26,7 @@ my $connections = $anvil->Database->connect({
|
|||||||
sql_file => $anvil->data->{sys}{database}{schema},
|
sql_file => $anvil->data->{sys}{database}{schema},
|
||||||
test_table => "network_interfaces",
|
test_table => "network_interfaces",
|
||||||
});
|
});
|
||||||
|
print $THIS_FILE." ".__LINE__."; connections: [".$connections."]\n";
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "log_0132", variables => { connections => $connections }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "log_0132", variables => { connections => $connections }});
|
||||||
if (not $connections)
|
if (not $connections)
|
||||||
{
|
{
|
||||||
@ -48,6 +50,7 @@ sub report_network
|
|||||||
|
|
||||||
# Write out the data in json format.
|
# Write out the data in json format.
|
||||||
my $directory = $anvil->data->{path}{sysfs}{network_interfaces};
|
my $directory = $anvil->data->{path}{sysfs}{network_interfaces};
|
||||||
|
print $THIS_FILE." ".__LINE__."; directory: [".$directory."]\n";
|
||||||
local(*DIRECTORY);
|
local(*DIRECTORY);
|
||||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "log_0018", variables => { directory => $directory }});
|
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, level => 3, key => "log_0018", variables => { directory => $directory }});
|
||||||
opendir(DIRECTORY, $directory);
|
opendir(DIRECTORY, $directory);
|
||||||
@ -57,6 +60,7 @@ sub report_network
|
|||||||
next if $file eq "..";
|
next if $file eq "..";
|
||||||
next if $file eq "lo";
|
next if $file eq "lo";
|
||||||
my $full_path = "$directory/$file";
|
my $full_path = "$directory/$file";
|
||||||
|
print $THIS_FILE." ".__LINE__."; full_path: [".$full_path."]\n";
|
||||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { full_path => $full_path }});
|
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 3, list => { full_path => $full_path }});
|
||||||
if (-d $full_path)
|
if (-d $full_path)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user