Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMartin Abente <mabente@paraguayeduca.org>2010-07-13 15:02:27 (GMT)
committer Anish Mangal <anish@activitycentral.com>2012-04-27 10:02:34 (GMT)
commit8192db81ad9dec4301d08d8621999ba3182ad510 (patch)
tree4a548269d431de97f31c8bebab1821ccd6c71288 /bin
parent90776fa036e959f933027098c2b9d6d391edd6ae (diff)
Journal Backup save lease
This feature was requested by Caacupe CATS.
Diffstat (limited to 'bin')
-rw-r--r--bin/journal-backup-volume6
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/journal-backup-volume b/bin/journal-backup-volume
index 9246760..7c5d32a 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'])