Martin,

We are testing extensively XS 0.6 looking forward to upgrade our current
(10) servers in production and to use it in our (26) new servers as
well. 

In doing so, we found that some of our scripts and stuff that worked
previously is having some difficulties because of some minor changes
(from the 0.5.2 days). Although we could adapt our stuff... life might
be easier if you accept the proposed patch :)

It does 2 things:

1) it makes xs-activation-import consider leases.dat a file containing
leases 

2) it logs every lease that was sent successfully. We need this because
we have a centralized database (Inventario) which let us know when was
the last time a laptop got a lease and from which School Server. 


Cheers,
Raúl



diff --git a/xs-activation-import b/xs-activation-import
index cbc89e4..39bbb80 100755
--- a/xs-activation-import
+++ b/xs-activation-import
@@ -105,7 +105,7 @@ def import_all_files(indir):
     """Read all the files in a given directory and import their lease
     information"""
     for fn in os.listdir(indir):
-        if fn == 'lease.sig':
+        if fn == 'lease.sig' or fn == 'leases.dat':
             try:
                 import_leases(os.path.join(indir, fn))
                 log("imported leases from %s" % fn)
diff --git a/xs-activation-tcpserver.py b/xs-activation-tcpserver.py
index 134e98b..40f7424 100755
--- a/xs-activation-tcpserver.py
+++ b/xs-activation-tcpserver.py
@@ -60,6 +60,7 @@ if re.match('^[A-Z0-9]{11}$', req):
     #       value within the bounds of leasetimelimit
     lease = myoat.get_lease(sn, 300)
     if lease:
+        sys.stderr.write("Sending lease for '%s'\n" % sn)
         myoat.mark_served_lease(sn)
         sys.stdout.write(lease)
         exit()
_______________________________________________
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel

Reply via email to