Check into accounting, before and after a print job start you have the
possibility to make a check for quota or whatever you want to check.
A return value of 0, means print.
example:
printcap:
p003:
:lp=172.16.16.1%9100
:sd=/var/spool/lpd/p003
:as=|/usr/local/lpracct/bin/somescript.pl
...
the :as entry is accounting start where you can call a script.
somescript:
#!/usr/bin/perl
#defines
$login ="";
$i =0;
#end defines
#read arguments
while($ARGV[$i]){
$arg=$ARGV[$i];
if ($arg=~ /-n/ ) { $login = substr $arg,2;}
if ($arg=~ /-P/ ) { $printer = substr $arg,2;}
$i=$i+1;
}
# check login
if (can_print($login,$printer)) { exit 0;
} else {
exit 3; #mail message to usr or whatever
}
so just fill in can_print to do some ldap lookup for example.
Greetings
Mikkel Fischer
-----------------------------------------------------------------------------
YOU MUST BE A LIST MEMBER IN ORDER TO POST TO THE LPRNG MAILING LIST
The address you post from MUST be your subscription address
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.
-----------------------------------------------------------------------------