Changeset 1519 for pykota/trunk/bin
- Timestamp:
- 06/04/04 00:12:53 (20 years ago)
- Location:
- pykota/trunk/bin
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r1517 r1519 24 24 # 25 25 # $Log$ 26 # Revision 1.59 2004/06/03 22:12:53 jalet 27 # Now denies empty jobs 28 # 26 29 # Revision 1.58 2004/06/03 21:50:33 jalet 27 30 # Improved error logging. … … 340 343 os.environ["PYKOTAPHASE"] = "BEFORE" 341 344 342 # checks the user's quota345 # do we want strict or laxist quota enforcement ? 343 346 if self.config.getPrinterEnforcement(printer.Name) == "STRICT" : 344 347 self.softwareJobSize = self.precomputeJobSize() … … 347 350 os.environ["PYKOTAPRECOMPUTEDJOBSIZE"] = str(self.softwareJobSize) 348 351 os.environ["PYKOTAPRECOMPUTEDJOBPRICE"] = str(self.softwareJobPrice) 352 353 # checks the user's quota 349 354 action = self.warnUserPQuota(userpquota) 355 356 # if no data to pass to real backend, probably a filter 357 # higher in the chain failed because of a misconfiguration. 358 # we deny the job in this case (nothing to print anyway) 359 if not self.jobSizeBytes : 360 self.logger.log_message(_("Job contains no data. Printing is denied."), "warn") 361 action = "DENY" 350 362 351 363 # exports some new environment variables -
pykota/trunk/bin/waitprinter.sh
r1516 r1519 24 24 # the printer would effectively never print again if the previous job 25 25 # was already fully printed. 26 if [ x$PYKOTAACTION != "xDENY" ] && [ x$PYKOTAPHASE == "xAFTER" ] && [ x$PYKOTAJOBSIZEBYTES != "x0" ]; then26 if [ x$PYKOTAACTION != "xDENY" ] && [ x$PYKOTAPHASE == "xAFTER" ] ; then 27 27 until snmpget -v1 -c public -Ov $1 HOST-RESOURCES-MIB::hrPrinterStatus.1 | grep -i printing >/dev/null; do 28 28 sleep 1 ;