Commit f3027390 authored by Marius Burkard's avatar Marius Burkard

Merge branch 'stable-3.1'

parents 55c54a85 dbaeb7e6
......@@ -502,13 +502,21 @@ class installer_dist extends installer_base {
$content = str_replace('{mysql_server_port}', $conf["mysql"]["port"], $content);
$content = str_replace('{mysql_server_ip}', $conf['mysql']['ip'], $content);
$content = str_replace('{hostname}', $conf['hostname'], $content);
$content = str_replace('{amavis_config_dir}', $conf['amavis']['config_dir'], $content);
wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content);
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640);
if(!is_file($conf['amavis']['config_dir'].'/60-dkim')) {
touch($conf['amavis']['config_dir'].'/60-dkim');
chmod($conf['amavis']['config_dir'].'/60-dkim', 0640);
}
// for CentOS 7.2 only
if($dist['confid'] == 'centos72') {
chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750);
chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis');
chmod($conf['amavis']['config_dir'].'/60-dkim', 0750);
chgrp($conf['amavis']['config_dir'].'/60-dkim', 'amavis');
}
......
......@@ -326,7 +326,7 @@ function get_distname() {
$distid = 'centos53';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 5 or compatible\n");
} elseif(stristr($content, 'CentOS Linux release 6')) {
} elseif(stristr($content, 'CentOS Linux release 6') || stristr($content, 'CentOS release 6')) {
$distname = 'CentOS';
$distver = 'Unknown';
$distid = 'centos53';
......
......@@ -246,7 +246,14 @@ class remoting {
//* Execute the SQL query
$app->db->query($sql);
$insert_id = $app->db->insertID();
if($app->db->errorMessage != '') {
throw new SoapFault('database_error', $app->db->errorMessage . ' '.$sql);
return false;
}
if ( isset($params['_primary_id'] ))
$insert_id = $params['_primary_id'];
else
$insert_id = $app->db->insertID();
//* Stop on error while executing the sql query
......
......@@ -293,7 +293,7 @@ class monitor_tools {
$distver = '5';
$distid = 'centos53';
$distbaseid = 'fedora';
} elseif(stristr($content, 'CentOS Linux release 6')) {
} elseif(stristr($content, 'CentOS Linux release 6') || stristr($content, 'CentOS release 6')) {
$distname = 'CentOS';
$distver = '6';
$distid = 'centos53';
......
Markdown is supported
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