Subject: [PATCH] Journal Backup save lease

From: Martin Abente <[email-masked]>
Date: Tue, 13 Jul 2010 11:02:27 -0400

This feature was requested by Caacupe CATS.
---
 bin/journal-backup-volume |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/bin/journal-backup-volume b/bin/journal-backup-volume
index 4f3ec8a..fe13004 100644
--- a/bin/journal-backup-volume
+++ b/bin/journal-backup-volume
@@ -23,6 +23,7 @@ import logging
 from sugar import env
 #from sugar.datastore import datastore
 
+lease_path = '/security/lease.sig'
 backup_identifier = sys.argv[2]
 volume_path = sys.argv[1]
 
@@ -37,6 +38,11 @@ backup_path = os.path.join(volume_path, 'backup', backup_identifier)
 if not os.path.exists(backup_path):
     os.makedirs(backup_path)
 
+# Save activation file
+if os.path.isfile(lease_path):
+    lease_content =  open(lease_path).read()
+    open(os.path.join(volume_path, 'lease.sig'), 'a+').write(lease_content)
+
 #datastore.freeze()
 #subprocess.call(['pkill', '-9', '-f', 'python.*datastore-service'])
 
-- 
1.6.0.4