From 15bf186b639b1ee317eb780c7a85fd2a1de50efe Mon Sep 17 00:00:00 2001 From: John Hodge Date: Wed, 4 May 2011 08:57:12 +0000 Subject: [PATCH] Updated config locations for new machine (and MIFARE serial port) --- sql-edition/servers/LDAPConnector.py | 2 +- sql-edition/servers/MIFAREClient.py | 2 +- sql-edition/servers/SnackConfig.py | 2 +- sql-edition/servers/VendServer.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql-edition/servers/LDAPConnector.py b/sql-edition/servers/LDAPConnector.py index 7bdcd2b..60408d0 100644 --- a/sql-edition/servers/LDAPConnector.py +++ b/sql-edition/servers/LDAPConnector.py @@ -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() diff --git a/sql-edition/servers/MIFAREClient.py b/sql-edition/servers/MIFAREClient.py index 502df18..e0b6a6c 100644 --- a/sql-edition/servers/MIFAREClient.py +++ b/sql-edition/servers/MIFAREClient.py @@ -4,7 +4,7 @@ from LDAPConnector import get_uid, set_card_id class MIFAREClient: def __init__(self): - self.port = Serial('/dev/ttyS0', baudrate = 19200) + self.port = Serial('/dev/ttyS2', baudrate = 19200) self.reader = MIFAREReader(self.port) self.reader.set_led(red = False, green = True) self.reader.beep(100) diff --git a/sql-edition/servers/SnackConfig.py b/sql-edition/servers/SnackConfig.py index a05f730..118cacd 100755 --- a/sql-edition/servers/SnackConfig.py +++ b/sql-edition/servers/SnackConfig.py @@ -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() diff --git a/sql-edition/servers/VendServer.py b/sql-edition/servers/VendServer.py index 9da6648..6b24f80 100755 --- a/sql-edition/servers/VendServer.py +++ b/sql-edition/servers/VendServer.py @@ -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') -- 2.20.1