Commit ff5b8653 authored by Till Brehm's avatar Till Brehm
Browse files

Fixed: FS#3341 - 3.0.5 fstab log bind fail on glusterfs

parent fddd90d3
......@@ -475,7 +475,9 @@ class apache2_plugin {
//* Change the log mount
$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$log_folder.' none bind';
$app->system->removeLine('/etc/fstab', $fstab_line);
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0';
$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$log_folder.' none bind,nobootwait';
$app->system->removeLine('/etc/fstab', $fstab_line);
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0';
$app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1);
}
......@@ -525,7 +527,7 @@ class apache2_plugin {
$app->system->chmod($data['new']['document_root'].'/'.$log_folder, 0755);
exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder));
//* add mountpoint to fstab
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0';
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0';
$app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1);
}
......
......@@ -479,7 +479,9 @@ class nginx_plugin {
//* Change the log mount
$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$log_folder.' none bind';
$app->system->removeLine('/etc/fstab', $fstab_line);
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0';
$fstab_line = '/var/log/ispconfig/httpd/'.$data['old']['domain'].' '.$data['old']['document_root'].'/'.$log_folder.' none bind,nobootwait';
$app->system->removeLine('/etc/fstab', $fstab_line);
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0';
$app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1);
}
......@@ -529,7 +531,7 @@ class nginx_plugin {
$app->system->chmod($data['new']['document_root'].'/'.$log_folder, 0755);
exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder));
//* add mountpoint to fstab
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait 0 0';
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0';
$app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1);
}
......
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