Datastore & backup - request for help

Martin Langhoff martin.langhoff at gmail.com
Tue May 20 03:47:06 EDT 2008


On Tue, May 20, 2008 at 5:43 PM, Martin Langhoff
<martin.langhoff at gmail.com> 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
-- 
 martin.langhoff at gmail.com
 martin at laptop.org -- School Server Architect
 - ask interesting questions
 - don't get distracted with shiny stuff - working code first
 - http://wiki.laptop.org/go/User:Martinlanghoff



More information about the Devel mailing list