Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar/0022-Journal-Backup-save-lease.patch
diff options
context:
space:
mode:
Diffstat (limited to 'rpms/sugar/0022-Journal-Backup-save-lease.patch')
-rw-r--r--rpms/sugar/0022-Journal-Backup-save-lease.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/rpms/sugar/0022-Journal-Backup-save-lease.patch b/rpms/sugar/0022-Journal-Backup-save-lease.patch
new file mode 100644
index 0000000..7dbc7c8
--- /dev/null
+++ b/rpms/sugar/0022-Journal-Backup-save-lease.patch
@@ -0,0 +1,37 @@
+From ad40835c07112c886bdf404cfd7eae4f14d75626 Mon Sep 17 00:00:00 2001
+From: Martin Abente <mabente@paraguayeduca.org>
+Date: Tue, 13 Jul 2010 11:02:27 -0400
+Subject: [PATCH sugar 22/74] Journal Backup save lease
+
+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 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'])
+
+--
+1.7.6
+