El Tue, 01 Aug 2000, tu escribiste:
> In the 'LPRng/UTILS/accounting.pl' file you will find a section labled
> "Put your code here" or something like that.
>
To be more precise, starting in line 260:
if( $action eq "START" ){
# this is where you can put in a test to see that the user
# has not exceeded his quota. Return $JREMOVE if he has
# put in a marker for this job.
$res=Check_quota("$opt{n}");
if($res==0)
{print STDERR "ERROR:Usuario $opt{n} sin cuota o con limite excedido\n";
exit($JREMOVE);
}
......
.......
However, and as someone pointed out, since the connection to the user is
broken, there's no way to write to the user's tty (unless you do something ugly
as finding out the user's tty and try to write to that tty/machine)
Alternatives I've tought of:
1. Writing a wrap around lpr so to call the real lpr only if the user
has paper quota left (painfull if you have too many clients)
2. Removing the job if the user has no quota left and e-mailing him to let
him know the situation (i am using this option now)
3. As suggested in the list, printing a banner like page specifing the user and
his quota situation instead of the real job. I didn't like this as you are
wasting paper anyway.
Any other ideas?
-----------------------------------------------------------------------------
If you need help, send email to [EMAIL PROTECTED] (or lprng-requests
or lprng-digest-requests) with the word 'help' in the body. For the impatient,
to subscribe to a list with name LIST, send mail to [EMAIL PROTECTED]
with: | example:
subscribe LIST <mailaddr> | subscribe lprng-digest [EMAIL PROTECTED]
unsubscribe LIST <mailaddr> | unsubscribe lprng [EMAIL PROTECTED]
If you have major problems, send email to [EMAIL PROTECTED] with the word
LPRNGLIST in the SUBJECT line.
-----------------------------------------------------------------------------