require QUota
This commit is contained in:
parent
784c7cfb55
commit
67f5f78f85
|
@ -1187,7 +1187,7 @@ sub cmd_account_quota($@)
|
|||
return 1;
|
||||
}
|
||||
|
||||
cmd_account_quota_sync($login, @_);
|
||||
cmd_account_quota_sync($login, 0);
|
||||
}
|
||||
else {
|
||||
cmd_account_quota_set($login, $action, @_);
|
||||
|
@ -1330,7 +1330,7 @@ sub cmd_account_quota_sync($;$)
|
|||
my $quotaSgoinfreBlock = $entry->get_value("quotaSgoinfreBlock") // $def_quota{block}{sgoinfre};
|
||||
my $quotaSgoinfreFile = $entry->get_value("quotaSgoinfreFile") // $def_quota{file}{sgoinfre};
|
||||
|
||||
eval 'use Quota; 1';
|
||||
require "Quota";
|
||||
|
||||
if (Quota::setqlim($dev_quota{home}, $entry->get_value("uidNumber"), int(0.9 * $quotaHomeBlock), $quotaHomeBlock, int(0.9 * $quotaHomeFile), $quotaHomeFile, 1, 0) == 0 and
|
||||
Quota::setqlim($dev_quota{sgoinfre}, $entry->get_value("uidNumber"), int(0.9 * $quotaSgoinfreBlock), $quotaSgoinfreBlock, int(0.9 * $quotaSgoinfreFile), $quotaSgoinfreFile, 1, 0) == 0) {
|
||||
|
@ -1343,7 +1343,8 @@ sub cmd_account_quota_sync($;$)
|
|||
|
||||
$ldap->unbind or die ("couldn't disconnect correctly");
|
||||
|
||||
if (!$nosync) {
|
||||
if (!$nosync)
|
||||
{
|
||||
Quota::sync($dev_quota{home});
|
||||
Quota::sync($dev_quota{sgoinfre});
|
||||
}
|
||||
|
@ -1353,7 +1354,7 @@ sub cmd_account_quota_sync($;$)
|
|||
|
||||
sub cmd_sync_quota(@)
|
||||
{
|
||||
eval 'use Quota; 1';
|
||||
require "Quota";
|
||||
|
||||
# Set root quota
|
||||
Quota::setqlim($dev_quota{home}, 0, 0, 0, 0, 0, 1, 0);
|
||||
|
|
Reference in New Issue
Block a user