italc-launcher patch for avoiding duplicate entries

Stéphane Graber stgraber at ubuntu.com
Thu Aug 20 12:17:44 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alkis Georgopoulos wrote:
> When italc-launcher is ran from the LTSP server, each client is
> autodetected twice. That's because avahi-publish publishes the service
> to all the server nics, so the same user is published for both eth0 and
> eth1.
> 
> Attached is a proposed patched version of italc-launcher (based on
> italc-master 1:1.0.9.1-0ubuntu13~ppa1) which fixes the problem by
> listening only on the nic that the first client is autodetected on.
> 

Hi Alkis, are lines exactly duplicates ?
If so, the following diff should work:

=== modified file 'debian/italc-launcher'
- --- debian/italc-launcher	2009-08-19 06:17:13 +0000
+++ debian/italc-launcher	2009-08-20 12:16:42 +0000
@@ -84,7 +84,7 @@
         if line and not line.startswith("CLASSROOM"):
             ip,mac,username=line.split(",")
             hosts.append([ip+":5900",0,username])
- -    return hosts
+    return set(hosts)

 def getAvahiHosts():
     hosts=[]
@@ -101,7 +101,7 @@
                     hosts.append([param[7]+":"+param[8],1,comment[0]])
             except:
                 print 'Ignoring a client, invalid data received'
- -    return hosts
+    return set(hosts)

 if not os.access("/etc/italc/keys/private/teacher/key",os.R_OK):
     md5_1="0"



- --
Stéphane Graber
Ubuntu developer
http://www.ubuntu.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkqNPugACgkQjxyfqkjBhuwBMwCfZdthnUMFMSsYMEpNZ9cQoWOg
hH4An3nN+qdzJeMkNfThlECaXqFFL3j1
=HG0+
-----END PGP SIGNATURE-----




More information about the edubuntu-devel mailing list