Sort out opendb placement and re-arrange tar parameters to avoid warning in logs
This commit is contained in:
parent
c2427189d5
commit
d179b06f69
@ -32,10 +32,10 @@ use esmith::util;
|
|||||||
use esmith::lockfile;
|
use esmith::lockfile;
|
||||||
use esmith::BlockDevices;
|
use esmith::BlockDevices;
|
||||||
use constant DEBUG => $ENV{MOJO_SMANAGER_DEBUG} || 0;
|
use constant DEBUG => $ENV{MOJO_SMANAGER_DEBUG} || 0;
|
||||||
our $cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
#our $cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
||||||
our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
#our $adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||||
our $rdb = esmith::ConfigDB->open('/etc/e-smith/restore')
|
#our $rdb = esmith::ConfigDB->open('/etc/e-smith/restore') || die "Couldn't open restore db";
|
||||||
|| die "Couldn't open restore db";
|
my ($cdb,$adb,$rdb);
|
||||||
my $es_backup = new esmith::Backup or die "Couldn't create Backup object\n";
|
my $es_backup = new esmith::Backup or die "Couldn't create Backup object\n";
|
||||||
my @directories = $es_backup->restore_list;
|
my @directories = $es_backup->restore_list;
|
||||||
@directories = grep { -e "/$_" } @directories;
|
@directories = grep { -e "/$_" } @directories;
|
||||||
@ -52,6 +52,9 @@ sub main {
|
|||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->app->log->info($c->log_req);
|
$c->app->log->info($c->log_req);
|
||||||
my %bac_datas = ();
|
my %bac_datas = ();
|
||||||
|
$cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
||||||
|
$adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||||
|
$rdb = esmith::ConfigDB->open('/etc/e-smith/restore');
|
||||||
my $title = $c->l('bac_BACKUP_TITLE');
|
my $title = $c->l('bac_BACKUP_TITLE');
|
||||||
my $notif;
|
my $notif;
|
||||||
$bac_datas{'function'} = 'desktop_backup';
|
$bac_datas{'function'} = 'desktop_backup';
|
||||||
@ -108,6 +111,9 @@ sub do_display {
|
|||||||
my $rt = $c->current_route;
|
my $rt = $c->current_route;
|
||||||
my ($res, $result) = '';
|
my ($res, $result) = '';
|
||||||
my $function = $c->param('Function');
|
my $function = $c->param('Function');
|
||||||
|
$cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
||||||
|
$adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||||
|
$rdb = esmith::ConfigDB->open('/etc/e-smith/restore');
|
||||||
|
|
||||||
if ($function =~ /^(\S+)$/) {
|
if ($function =~ /^(\S+)$/) {
|
||||||
$function = $1;
|
$function = $1;
|
||||||
@ -265,6 +271,9 @@ sub do_update {
|
|||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->app->log->info($c->log_req);
|
$c->app->log->info($c->log_req);
|
||||||
my $rt = $c->current_route;
|
my $rt = $c->current_route;
|
||||||
|
$cdb = esmith::ConfigDB->open || die "Couldn't open config db";
|
||||||
|
$adb = esmith::AccountsDB->open || die "Couldn't open accounts db";
|
||||||
|
$rdb = esmith::ConfigDB->open('/etc/e-smith/restore');
|
||||||
my $function = $c->param('Function');
|
my $function = $c->param('Function');
|
||||||
DEBUG && warn("do_update $function");
|
DEBUG && warn("do_update $function");
|
||||||
my %bac_datas = ();
|
my %bac_datas = ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user