On Tue, May 20, 2008 at 5:43 PM, Martin Langhoff
<[EMAIL PROTECTED]> wrote:
> Now that I have ds_backup that does backup something (thanks Tomeu for
> the script to grow the ds), I am looking at doing it correctly.

Couple more things that I want to do, and I am unsure where to hook into:

 - On success, this script has to save a "last successful run"
timestamp locally. Somewhere very cheap to read. If we have a "flags"
directory, I will gladly touch a file - that is how cheap and simple I
mean :-) Do we have a "flags" directory that we preserve across
reboots?

 - Similarly, do we have a "locks" directory? I need to flock a file
to prevent concurrent runs... It is ok if the locks dir gets wiped at
boot time. /var/lock exists, but the lock group does not include our
"olpc" user.

 - Can we trigger scripts on network changes easily? I want to hook up
on the same hook that switches gabble on :-) (hmmm, I found
/etc/NetworkManager/dispatcher.d , looks promising)

 - Can we check cheaply from shell whether we are on battery power,
and what the level of the battery is? Is it safe to just read
/sys/class/power_supply/olpc-battery/capacity and
/sys/class/power_supply/olpc-ac/status?

cheers,



martin
-- 
 [EMAIL PROTECTED]
 [EMAIL PROTECTED] -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff
_______________________________________________
Devel mailing list
[email protected]
http://lists.laptop.org/listinfo/devel

Reply via email to