Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/rpms/sugar/0022-Journal-Backup-save-lease.patch
blob: 7dbc7c8aec855f73b9442751142199fbd9dc29a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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