better logging

This commit is contained in:
Roland Gruber 2011-12-07 20:50:32 +00:00
parent a96a2feabf
commit c739c02167
1 changed files with 7 additions and 6 deletions

View File

@ -348,10 +348,11 @@ sub setQuotas {
($<, $>) = ($>, $<); # Get root privileges
while ($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);
if ($return == -1) {
$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 {
logMessage(LOG_INFO, "Set quota for $user[0].");