Commit b7e3de5a authored by Martin's avatar Martin
Browse files

Merge branch 'xfs_quota-fix' into 'stable-3.1'

Fix xfs_quota:

- Replace username with groupname sins "-g" is used
 - Set the path for the timer command

See merge request !1
parents a638fc82 b778132a
......@@ -894,10 +894,10 @@ class apache2_plugin {
exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null');
} elseif ($file_system == 'xfs') {
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $groupname' $primitive_root");
// xfs only supports timers globally, not per user.
exec("xfs_quota -x -c 'timer -bir -i 604800'");
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
unset($project_uid, $username_position, $xfs_projects);
unset($primitive_root, $df_output, $mb_hard, $mb_soft);
......
......@@ -145,10 +145,10 @@ class cron_plugin {
exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null');
} elseif ($file_system == 'xfs') {
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $groupname' $primitive_root");
// xfs only supports timers globally, not per user.
exec("xfs_quota -x -c 'timer -bir -i 604800'");
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
unset($project_uid, $username_position, $xfs_projects);
unset($primitive_root, $df_output, $mb_hard, $mb_soft);
......
......@@ -752,10 +752,10 @@ class nginx_plugin {
exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null');
} elseif ($file_system == 'xfs') {
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $groupname' $primitive_root");
// xfs only supports timers globally, not per user.
exec("xfs_quota -x -c 'timer -bir -i 604800'");
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
unset($project_uid, $username_position, $xfs_projects);
unset($primitive_root, $df_output, $mb_hard, $mb_soft);
......
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