From 0fde94b6b3add31a1c17933cfda802bdabfe831e Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Fri, 9 Mar 2012 20:17:26 +0000 Subject: [PATCH 1/1] Write both time of last ldap update and time of last run to trace file Signed-off-by: Stephen Gran --- ud-generate | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ud-generate b/ud-generate index d699633..004e64a 100755 --- a/ud-generate +++ b/ud-generate @@ -1246,11 +1246,10 @@ except IOError, e: else: raise e -fd = open(os.path.join(GenerateDir, "last_update.trace"), "w") -fd.write("%s\n%s\n" % (last, int(time.time()))) -fd.close() - if cache_last_mod[0] >= last: + fd = open(os.path.join(GenerateDir, "last_update.trace"), "w") + fd.write("%s\n%s\n" % (last, int(time.time()))) + fd.close() sys.exit(0) # Fetch all the groups @@ -1282,6 +1281,10 @@ finally: if lock is not None: lock.release() +fd = open(os.path.join(GenerateDir, "last_update.trace"), "w") +fd.write("%s\n%s\n" % (last, int(time.time()))) +fd.close() + # vim:set et: # vim:set ts=3: # vim:set shiftwidth=3: -- 2.20.1