Changeset 3103
- Timestamp:
- 12/01/06 23:14:47 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/pksetup
r3085 r3103 197 197 198 198 otherpackages = [ { "name" : "pkpgcounter", 199 "version" : "2.1 0",199 "version" : "2.12", 200 200 "url" : "http://www.pykota.com/software/%(name)s/download/tarballs/%(name)s-%(version)s.tar.gz", 201 201 "commands" : [ "tar -zxf %(name)s-%(version)s.tar.gz", … … 349 349 self.confirmCommand("to improve PyKota's configuration wrt your existing printers", 'echo "%(suffix)s" >>%(home)s/pykota.conf' % locals()) 350 350 351 def importPrinters(self) :352 """Imports the existing print queues in the database."""353 self.confirmCommand("to import your existing print queues into PyKota's database", "pkturnkey --force 2>/dev/null")354 355 351 def addPyKotaUser(self) : 356 352 """Adds a system user named pykota, returns its home directory or None""" … … 378 374 """For each printer, asks if it should be managed with PyKota or not.""" 379 375 for (queuename, deviceuri) in printers : 380 if not deviceuri.startswith("cupspykota:") : 381 newdeviceuri = "cupspykota://%s" % deviceuri 382 command = "lpadmin -p %(queuename)s -v %(newdeviceuri)s" % locals() 383 self.confirmCommand("to manage the %(queuename)s print queue with PyKota" % locals(), command) 376 command = 'pkprinters --add --cups --description "Printer created with pksetup" "%(queuename)s"' % locals() 377 self.confirmCommand("to import the %(queuename)s print queue into PyKota's database and reroute it through PyKota" % locals(), command) 384 378 385 379 def setup(self) : … … 402 396 self.setupBackend() 403 397 self.managePrinters(self.listPrinters()) 404 self.importPrinters()405 398 print nowready 406 399 print "The script %s can be used to reinstall in unattended mode.\n" % self.genInstaller()