diff options
author | Martin Abente <mabente@paraguayeduca.org> | 2010-07-13 15:02:27 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-11-01 16:52:17 (GMT) |
commit | 6afb46ce3e16a1902b52e1c2b7705d483a2dbb75 (patch) | |
tree | bd5338d5eddd90d490c14370c2a42087bcbd2edb | |
parent | 67f22dbdb7ec45659d8e1799acfab379ad9f893e (diff) |
Journal Backup save lease
This feature was requested by Caacupe CATS.
-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']) |