diff options
author | Martin Abente <mabente@paraguayeduca.org> | 2010-07-13 15:02:27 (GMT) |
---|---|---|
committer | Anish Mangal <anish@sugarlabs.org> | 2011-08-26 05:55:54 (GMT) |
commit | 31d7b59f9172e9b0f8f386ad79d4349158e26444 (patch) | |
tree | 93afc621d15314fdcbc3e1a0c4e1bb86875c3593 | |
parent | a58712224587ac2b810c81619be860fca652d2fe (diff) |
Journal Backup save lease
This feature was requested by Caacupe CATS.
Signed-off-by: Anish Mangal <anish@sugarlabs.org>
-rw-r--r-- | 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 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']) |