Gentoo Archives: gentoo-laptop

From: Fred Labrosse <ffl@×××××××.uk>
To: gentoo-laptop@l.g.o
Subject: [gentoo-laptop] laptop-mode-tools and updatedb (or cron jobs in general)
Date: Wed, 27 Sep 2006 09:31:38
Message-Id: 200609271029.25809.ffl@aber.ac.uk
1 All,
2
3 I recently discovered laptop-mode-tools and it does replace advantageously the
4 scripts I had written to respond to acpi events. And it does much more!
5
6 One thing it does not do (nor were my scripts) is turn off things like
7 updatedb when running on battery. I looked into that and thought about the
8 various options and here's the result:
9
10 - One could just move the slocate script from and in /etc/cron.daily to
11 control it running or not. The problem with that approach is that the script
12 needs to be saved somewhere and then moved (or linked) when it is needed.
13 Moreover, if people want to run it weekly instead of daily, then the moving
14 needs to be changed.
15
16 - One could remove the slocate script from /etc/cron.daily (or wherever it is)
17 and have a line in the crontab file. This has very similar limitations to
18 the method above.
19
20 - One could have laptop-mode-tools write something like "updatedb=[off|on]" in
21 some state file (let's say in /var/state) and have the slocate script source
22 that state file and run or not updatedb based on the value of the defined
23 variable. This would not have the above limitations and could be applied to
24 all the cron jobs. However, this would need modifying system scripts,
25 therefore introducing more work at every update of these.
26
27 I do think that the final method is the way to go to solve that problem and
28 would be interested in developing/experimenting that.
29
30 Has anybody done anything like that? Is that something that could be
31 integrated in gentoo at some stage? Do people have
32 suggestions/comments/criticisms, etc.?
33
34 Cheers,
35
36 Fred
37 --
38 gentoo-laptop@g.o mailing list

Replies

Subject Author
Re: [gentoo-laptop] laptop-mode-tools and updatedb (or cron jobs in general) Gabriel Tarantini <gtarantini@×××××.com>
Re: [gentoo-laptop] laptop-mode-tools and updatedb (or cron jobs in general) Devon Miller <devon.c.miller@×××××.com>