Updated config locations for new machine (and MIFARE serial port)
authorJohn Hodge <[email protected]>
Wed, 4 May 2011 08:57:12 +0000 (08:57 +0000)
committerJohn Hodge <[email protected]>
Wed, 4 May 2011 08:57:12 +0000 (08:57 +0000)
sql-edition/servers/LDAPConnector.py
sql-edition/servers/MIFAREClient.py
sql-edition/servers/SnackConfig.py
sql-edition/servers/VendServer.py

index 7bdcd2b..60408d0 100644 (file)
@@ -13,7 +13,7 @@ def get_ldap_connection():
         conn = ldap.initialize('ldaps://mussel.ucc.gu.uwa.edu.au/')
         
         binddn = 'cn=mifareagent,ou=profile,dc=ucc,dc=gu,dc=uwa,dc=edu,dc=au'
-        passfile = open('/etc/dispense/ldap.passwd')
+        passfile = open('/etc/dispense2/ldap.passwd')
         password = passfile.readline().strip()
         passfile.close()
         
index 502df18..e0b6a6c 100644 (file)
@@ -4,7 +4,7 @@ from LDAPConnector import get_uid, set_card_id
 \r
 class MIFAREClient:\r
     def __init__(self):\r
-        self.port = Serial('/dev/ttyS0', baudrate = 19200)\r
+        self.port = Serial('/dev/ttyS2', baudrate = 19200)\r
         self.reader = MIFAREReader(self.port)\r
         self.reader.set_led(red = False, green = True)\r
         self.reader.beep(100)\r
index a05f730..118cacd 100755 (executable)
@@ -2,7 +2,7 @@
 
 class VendingException( Exception ): pass
 
-FILENAME="/etc/dispense/snacks.conf"
+FILENAME="/etc/dispense2/snacks.conf"
 
 def parse_line( l ):
        toks = l.strip().split()
index 9da6648..6b24f80 100755 (executable)
@@ -941,7 +941,7 @@ def parse_args():
        from optparse import OptionParser
 
        op = OptionParser(usage="%prog [OPTION]...")
-       op.add_option('-f', '--config-file', default='/etc/dispense/servers.conf', metavar='FILE', dest='config_file', help='use the specified config file instead of /etc/dispense/servers.conf')
+       op.add_option('-f', '--config-file', default='/etc/dispense2/servers.conf', metavar='FILE', dest='config_file', help='use the specified config file instead of /etc/dispense/servers.conf')
        op.add_option('--serial', action='store_true', default=True, dest='use_serial', help='use the serial port')
        op.add_option('--lat', action='store_true', default=False, dest='use_lat', help='use LAT')
        op.add_option('--virtualvend', action='store_false', default=True, dest='use_serial', help='use the virtual vending server instead of LAT')

UCC git Repository :: git.ucc.asn.au