better logging
This commit is contained in:
parent
a96a2feabf
commit
c739c02167
|
@ -348,10 +348,11 @@ sub setQuotas {
|
||||||
($<, $>) = ($>, $<); # Get root privileges
|
($<, $>) = ($>, $<); # Get root privileges
|
||||||
while ($quota[$i][0]) {
|
while ($quota[$i][0]) {
|
||||||
$dev = Quota::getqcarg($quota[$i][0]);
|
$dev = Quota::getqcarg($quota[$i][0]);
|
||||||
|
last if ($dev eq '');
|
||||||
$return = Quota::setqlim($dev,$user[2],$quota[$i][1],$quota[$i][2],$quota[$i][3],$quota[$i][4],1,$group);
|
$return = Quota::setqlim($dev,$user[2],$quota[$i][1],$quota[$i][2],$quota[$i][3],$quota[$i][4],1,$group);
|
||||||
if ($return == -1) {
|
if ($return == -1) {
|
||||||
$return = "ERROR,Lamdaemon ($hostname),Unable to set quota!";
|
$return = "ERROR,Lamdaemon ($hostname),Unable to set quota!";
|
||||||
logMessage(LOG_ERR, "Unable to set quota for $user[0].");
|
logMessage(LOG_ERR, "Unable to set quota for $user[0] on " . $quota[$i][0] . ".");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logMessage(LOG_INFO, "Set quota for $user[0].");
|
logMessage(LOG_INFO, "Set quota for $user[0].");
|
||||||
|
|
Loading…
Reference in New Issue