Changeset 1759 for pykota/trunk/bin
- Timestamp:
- 09/30/04 13:22:30 (20 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/autopykota
r1758 r1759 24 24 # 25 25 # $Log$ 26 # Revision 1.2 2004/09/30 11:22:30 jalet 27 # Extends the PATH and doesn't use absolute path anymore to launch edpykota. 28 # 26 29 # Revision 1.1 2004/09/30 09:52:45 jalet 27 30 # Initial release of autopykota. Reading help or manpage is greatly … … 80 83 def main(self, arguments, options) : 81 84 """Main entry point.""" 85 os.environ["PATH"] = "%s:/bin:/usr/bin:/usr/local/bin:/opt/bin" % os.environ.get("PATH", "") 82 86 username = os.environ.get("PYKOTAUSERNAME") 83 87 printername = os.environ.get("PYKOTAPRINTERNAME") … … 95 99 else : 96 100 self.logdebug("User %s already exists. Creating a quota entry for user %s on printer %s." % (username, username, printername)) 97 return os.system(' /usr/bin/edpykota --add --printer "%s" "%s"' % (printername, username))101 return os.system('edpykota --add --printer "%s" "%s"' % (printername, username)) 98 102 else : 99 103 self.logdebug("User %s already exists. Printer %s doesn't exist. Creating printer %s and a quota entry for user %s on printer %s." % (username, printername, printername, username, printername)) 100 return os.system(' /usr/bin/edpykota --add --printer "%s" "%s"' % (printername, username))104 return os.system('edpykota --add --printer "%s" "%s"' % (printername, username)) 101 105 else : 102 106 if options["initbalance"] is None : … … 104 108 else : 105 109 self.logdebug("User %s doesn't exist yet. Creating user %s's account and quota entries on all existing printers." % (username, username)) 106 return os.system(' /usr/bin/edpykota --add --limitby balance --balance "%s" "%s"' % (options["initbalance"], username))110 return os.system('edpykota --add --limitby balance --balance "%s" "%s"' % (options["initbalance"], username)) 107 111 108 112 if __name__ == "__main__" :