* Fixed a bug where setting the db_in_use flag without a valid $ENV{_}.

* Added a nice_exit call to tools/striker-access-database

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 2 years ago
parent 21738ab0d4
commit ef3ac86162
  1. 2
      Anvil/Tools/Database.pm
  2. 1
      scancore-agents/scan-lvm/scan-lvm
  3. 2
      tools/anvil-daemon
  4. 19
      tools/anvil-manage-files
  5. 1
      tools/striker-access-database

@ -15379,7 +15379,7 @@ sub mark_active
return(0);
}
my $caller = $ENV{_};
my $caller = $ENV{_} ? $ENV{_} : "unknown";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => $debug, list => { 'caller' => $caller }});
# Record that we're using each available striker DB UUID.

@ -86,6 +86,7 @@ find_changes($anvil);
# Shut down.
$anvil->ScanCore->agent_shutdown({agent => $THIS_FILE});
$anvil->nice_exit({exit_code => 0});
#############################################################################################################

@ -841,7 +841,7 @@ sub check_incoming
{
my ($anvil) = @_;
my $shell_call = $anvil->data->{path}{exe}{'anvil-manage-files'};
my $shell_call = $anvil->data->{path}{exe}{'anvil-manage-files'}." --check";
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { shell_call => $shell_call }});
my ($output, $return_code) = $anvil->System->call({
shell_call => $shell_call,

@ -51,7 +51,7 @@ if (($running_directory =~ /^\./) && ($ENV{PWD}))
my $anvil = Anvil::Tools->new();
$anvil->Get->switches({list => ["delete", "download", "file", "is-script", "job-uuid", "rename", "remove", "add", "to"], man => $THIS_FILE});
$anvil->Get->switches({list => ["add", "check", "delete", "download", "file", "is-script", "job-uuid", "rename", "remove", "to"], man => $THIS_FILE});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => $anvil->data->{switches}});
# Connect or die
@ -106,7 +106,7 @@ elsif ($anvil->data->{switches}{'is-script'})
{
handle_script($anvil);
}
else
elsif ($anvil->data->{switches}{check})
{
# Check for files scheduled for deletion.
check_for_deletes($anvil);
@ -117,6 +117,11 @@ else
# Check for files we should have but don't yet have.
find_missing_files($anvil);
}
else
{
# Show the list of all files we know about.
show_files($anvil);
}
# We're done
$anvil->nice_exit({exit_code => 0});
@ -126,6 +131,16 @@ $anvil->nice_exit({exit_code => 0});
# Private functions. #
#############################################################################################################
# This lists all files.
sub show_files
{
my ($anvil) = @_;
return(0);
}
# This looks to see if there are any entries in 'file_locations' for us that, the pointed to file, doesn't
# exist on this machine. For those entries, we will search for the file on other machines. The one exception
# is server definition files. For those, we write the file out from the server's 'definition' table entry.

@ -74,3 +74,4 @@ else
$anvil->nice_exit({ exit_code => 1 });
}
$anvil->nice_exit({ exit_code => 0 });

Loading…
Cancel
Save