Skip to content

Commit 36e7a4c

Browse files
author
Till Brehm
committed
Merge branch 'stable-3.1' into 'stable-3.1'
Fix xfs_quota Fix xfs_quota: - Replace "-g" with "-u" because username is is used - Set the path for the timer command See merge request !458
2 parents 568430f + 1cccf01 commit 36e7a4c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,10 +890,10 @@ function update($event_name, $data) {
890890
$primitive_root = $df_output[1];
891891

892892
if($file_system == 'xfs') {
893-
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
893+
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
894894

895895
// xfs only supports timers globally, not per user.
896-
exec("xfs_quota -x -c 'timer -bir -i 604800'");
896+
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
897897

898898
unset($project_uid, $username_position, $xfs_projects);
899899
unset($primitive_root, $df_output, $mb_hard, $mb_soft);

server/plugins-available/cron_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,10 @@ function update($event_name, $data) {
145145
exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null');
146146
} elseif ($file_system == 'xfs') {
147147

148-
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
148+
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
149149

150150
// xfs only supports timers globally, not per user.
151-
exec("xfs_quota -x -c 'timer -bir -i 604800'");
151+
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
152152

153153
unset($project_uid, $username_position, $xfs_projects);
154154
unset($primitive_root, $df_output, $mb_hard, $mb_soft);

server/plugins-available/nginx_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,10 @@ function update($event_name, $data) {
748748
$primitive_root = $df_output[1];
749749

750750
if($file_system == 'xfs') {
751-
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
751+
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
752752

753753
// xfs only supports timers globally, not per user.
754-
exec("xfs_quota -x -c 'timer -bir -i 604800'");
754+
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
755755

756756
unset($project_uid, $username_position, $xfs_projects);
757757
unset($primitive_root, $df_output, $mb_hard, $mb_soft);

0 commit comments

Comments
 (0)