Skip to content

Commit c8679f3

Browse files
author
Florian Schaal
committed
FS#4031 - Disabling server option "Network Filesystem" does not work
1 parent 576d93b commit c8679f3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ function update($event_name, $data) {
595595

596596
//* Unmount the old log directory bfore we move the log dir
597597
//exec('fuser -km '.escapeshellcmd($old_dir.'/log'));
598-
exec('umount '.escapeshellcmd($old_dir.'/log'));
598+
exec('umount '.escapeshellcmd($data['old']['document_root'].'/log'));
599599

600600
//* Create new base directory, if it does not exist yet
601601
if(!is_dir($new_dir)) $app->system->mkdirpath($new_dir);
@@ -691,7 +691,8 @@ function update($event_name, $data) {
691691
$app->system->chmod($data['new']['document_root'].'/'.$log_folder, 0755);
692692
exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder));
693693
//* add mountpoint to fstab
694-
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0';
694+
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait';
695+
$fstab_line .= @($web_config['network_filesystem'] == 'y')?',_netdev 0 0':' 0 0';
695696
$app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1);
696697
}
697698

server/plugins-available/nginx_plugin.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ function update($event_name, $data) {
476476

477477
//* Unmount the old log directory bfore we move the log dir
478478
//exec('fuser -km '.escapeshellcmd($old_dir.'/log'));
479-
exec('umount '.escapeshellcmd($old_dir.'/log'));
479+
exec('umount '.escapeshellcmd($data['old']['document_root'].'/log'));
480480

481481
//* Create new base directory, if it does not exist yet
482482
if(!is_dir($new_dir)) $app->system->mkdirpath($new_dir);
@@ -572,7 +572,8 @@ function update($event_name, $data) {
572572
$app->system->chmod($data['new']['document_root'].'/'.$log_folder, 0755);
573573
exec('mount --bind '.escapeshellarg('/var/log/ispconfig/httpd/'.$data['new']['domain']).' '.escapeshellarg($data['new']['document_root'].'/'.$log_folder));
574574
//* add mountpoint to fstab
575-
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait,_netdev 0 0';
575+
$fstab_line = '/var/log/ispconfig/httpd/'.$data['new']['domain'].' '.$data['new']['document_root'].'/'.$log_folder.' none bind,nobootwait';
576+
$fstab_line .= @($web_config['network_filesystem'] == 'y')?',_netdev 0 0':' 0 0';
576577
$app->system->replaceLine('/etc/fstab', $fstab_line, $fstab_line, 1, 1);
577578
}
578579

0 commit comments

Comments
 (0)