From: Martin Langhoff <[EMAIL PROTECTED]>

There's no need to rm the lockfile. Keep it, save NAND cycles.

Thanks to Michael Stone for the hint.
---

This series of 4 trivial patches continues work on DS Backup. This is a
cleanup as I am setting things up to finish the server side.

---

 ds_backup.sh |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/ds_backup.sh b/ds_backup.sh
index 76db42c..9916334 100755
--- a/ds_backup.sh
+++ b/ds_backup.sh
@@ -107,9 +107,10 @@ skip_ifrecent;
 skip_onlowbatt;
 skip_noschoolnet;
 
-### Ok, we are going to atte,pt a backup
+### Ok, we are going to attempt a backup
 
 # make the lock dir if needed
+# we will keep the (empty) file around
 if [ ! -d ~/.sugar/default/lock ]
 then
     mkdir ~/.sugar/default/lock || exit 1;
@@ -135,8 +136,8 @@ LOCKFILE=~/.sugar/default/lock/ds_backup.run
 flock -n $LOCKFILE `dirname $0 `/ds_backup.py
 EXITCODE=$?
 
-# Clean up the lock - if we can ;-)
-rm $LOCKFILE 2>/dev/null
+# Note: we keep the lockfile around to save
+# NAND cycles.
 
 # Propagate the exit code of the flock/ds_backup invocation
 exit $EXITCODE
-- 
1.5.4.34.g053d9

_______________________________________________
Server-devel mailing list
[email protected]
http://lists.laptop.org/listinfo/server-devel

Reply via email to