Commit f0484410 authored by Emmanuel Bouthenot's avatar Emmanuel Bouthenot Committed by IKEDA Soji
Browse files

Fix log severity in some command line tools used in postinst

parent b9b8e9ed
......@@ -84,6 +84,29 @@ sub process {
my $sdm = Sympa::DatabaseManager->instance
or die 'Can\'t connect to database';
# Checking if bulkmailer_table exits
my @tables;
my $list_of_tables;
if ($list_of_tables = $sdm->get_tables()) {
@tables = @{$list_of_tables};
} else {
@tables = ();
}
my $found = 0;
foreach my $t (@tables) {
if ($t eq "bulkmailer_table") {
$found = 1;
last;
}
}
if ($found == 0) {
$log->syslog(
'notice',
'bulkmailer table not found in database, bulk spool of your Sympa is probably up-to-date'
);
exit 0;
}
my $sth = $sdm->do_prepared_query(
q{SELECT *
FROM bulkmailer_table
......
......@@ -232,9 +232,8 @@ if ($main::options{'upgrade_config_location'}) {
## Check that the data structure is uptodate
unless (Conf::data_structure_uptodate()) {
printf STDERR
printf STDOUT
"Data structure was not updated; you should run sympa.pl --upgrade to run the upgrade process.\n";
exit 1;
}
exit 0;
......@@ -777,7 +776,7 @@ if ($main::options{'dump'}) {
$main::options{'to'} ||= Sympa::Constants::VERSION;
if ($main::options{'from'} eq $main::options{'to'}) {
$log->syslog('err', 'Current version: %s; no upgrade is required',
$log->syslog('notice', 'Current version: %s; no upgrade is required',
$main::options{'to'});
exit 0;
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment