Changeset 3236 for pykota

Show
Ignore:
Timestamp:
07/24/07 13:21:04 (17 years ago)
Author:
jerome
Message:

Doesn't create a symlink to cupspykota if this is not needed.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/bin/pksetup

    r3233 r3236  
    372372    def setupBackend(self) : 
    373373        """Installs the cupspykota backend.""" 
    374         backendsdirectory = self.backendsdirectory 
    375         pykotadirectory = self.pykotadirectory 
    376         self.confirmCommand("to make PyKota known to CUPS", "ln -s %(pykotadirectory)s/cupspykota %(backendsdirectory)s/cupspykota" % locals()) 
    377         self.confirmCommand("to restart CUPS for the changes to take effect", self.cupsrestart) 
     374        backend = os.path.join(self.backendsdirectory, "cupspykota") 
     375        if not os.path.exists(backend) : 
     376            realbackend = os.path.join(self.pykotadirectory, "cupspykota") 
     377            self.confirmCommand("to make PyKota known to CUPS", "ln -s %(realbackend)s %(backend)s" % locals()) 
     378            self.confirmCommand("to restart CUPS for the changes to take effect", self.cupsrestart) 
    378379         
    379380    def managePrinters(self, printers) :