- Timestamp:
- 11/27/04 23:52:07 (20 years ago)
- Location:
- pykota/trunk
- Files:
-
- 2 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/tool.py
r1944 r1960 22 22 # 23 23 # $Log$ 24 # Revision 1.145 2004/11/27 22:52:07 jalet 25 # Now PyKota searches its configuration files first in system user pykota's 26 # home directory 27 # 24 28 # Revision 1.144 2004/11/18 06:01:53 jalet 25 29 # Fix for the fix … … 522 526 import sys 523 527 import os 528 import pwd 524 529 import fnmatch 525 530 import getopt … … 600 605 # pykota specific stuff 601 606 self.documentation = doc 607 608 # try to find the configuration files in user's 'pykota' home directory. 602 609 try : 603 self.config = config.PyKotaConfig("/etc/pykota") 610 pykotauser = pwd.getpwnam("pykota") 611 except KeyError : 612 confdir = "/etc/pykota" 613 missingUser = 1 614 else : 615 confdir = pykotauser[5] 616 missingUser = 0 617 618 try : 619 self.config = config.PyKotaConfig(confdir) 604 620 except ConfigParser.ParsingError, msg : 605 621 sys.stderr.write("ERROR: Problem encountered while parsing configuration file : %s\n" % msg) … … 615 631 self.crashed(msg) 616 632 raise 633 634 # We NEED this here, even when not in an accounting filter/backend 617 635 self.softwareJobSize = 0 618 636 self.softwareJobPrice = 0.0 637 619 638 if defaultToCLocale : 620 639 self.printInfo("Incorrect locale settings. PyKota falls back to the 'C' locale.", "warn") 640 if missingUser : 641 self.printInfo("The 'pykota' system account is missing. Configuration files were searched in /etc/pykota instead.", "warn") 642 621 643 self.logdebug("Charset in use : %s" % self.charset) 622 644 arguments = " ".join(['"%s"' % arg for arg in sys.argv]) -
pykota/trunk/README
r1951 r1960 341 341 You may need to be logged in with sufficient privileges (e.g. root) 342 342 343 Create a system user for PyKota : 344 345 adduser --system --group --gecos PyKota pykota 346 347 Put the user your printing system is run as in the pykota system group : 348 349 adduser lp pykota 350 351 NB : on our system, the CUPS printing system runs as system user 'lp'. 352 Please adapt this to your own system. 353 343 354 Go to the initscripts subdirectory of PyKota's sources, and choose 344 355 the appropriate storage backend for your configuration. Read carefully