Hide Forgot
man-1.6c-2.fc5 makewhatis started running on my laptop, while it was unplugged from the AC. The scripts should use on_ac_power and not run when the laptop is on battery power.
I have some bugs related with "laptop on battery". I'm thinking about some global solution.
*** Bug 205114 has been marked as a duplicate of this bug. ***
*** Bug 197394 has been marked as a duplicate of this bug. ***
*** Bug 249586 has been marked as a duplicate of this bug. ***
/me adjusts the summary of this bug to a general one, as the bugs that were marked as dupes for this one are not specific to makewhatis (mine was for prelink, which is way worse then makewhatis here) (In reply to comment #0) > man-1.6c-2.fc5 > makewhatis started running on my laptop, while it was unplugged from the AC. The > scripts should use on_ac_power and not run when the laptop is on battery power. Bastien, its just a workaround and we need a proper solution, but for now my workaround was to add "MAKEWHATISDBUPDATES n" to /etc/man.config as I don't use makewhatis (In reply to comment #2) > I have some bugs related with "laptop on battery". I'm thinking about some > global solution. Marcela, that was months ago. Did something come out of it? Otherwise I vote for "fixing the worst jobs for F8 with small hacks" until we have a proper solution
I believe it should be fixed in some laptop configuration tool. In the meantime I'll try to fix it with some script, which control on "battery" and don't run some jobs.
(In reply to comment #7) > I believe it should be fixed in some laptop configuration tool. Why configuration tool? It IMHO should "just work (tm)" > In the meantime > I'll try to fix it with some script, which control on "battery" and don't run > some jobs. thx; if you need any help let me know; I'm willing to help write some bash scritps if you outline a rough solution (we can discuss our ideas on IRC, on a mailing list or here as well beforehand); and of course I'm also willing to test stuff.
There's indeed no need for a configuration tool, and there's already a script, it's called "on_ac_power", and it's in the pm-utils.
IMO, it would be sufficient to use "on_ac_power" for the bigger cron jobs (the prelink monster, makewhatis). These are optional jobs which help save time later but don't affect functionality; ideal candidates for an optional cron job that can and should be skipped to save batter power. No global solution is really needed; this isn't an ugly hack, it's exactly the kind of situation that on_ac_power is designed for.
I used on_ac_power for anacron - cron.daily,... I hope that fix will be ok for all "jobs should not run when on battery".
*** Bug 125779 has been marked as a duplicate of this bug. ***
(In reply to comment #11) > I used on_ac_power for anacron - cron.daily,... I hope that fix will be ok for > all "jobs should not run when on battery". I'd tend to say it's a hack that might create more problems then it solved: - some of the cron.daily job IMHO should run even when on battery (e.g. 0logwatch and logrotate for example) - what about cron.{hourly, weekly, monthly}? - what if someone always starts his notebook on battery everyday in the morning (e.g. when traveling by train to work for 90 minutes)? Then the daily jobs might never run if cron tries to start the jobs in that timeframe (even when the system is on_as later (e.g. when at work) most of the day).
It's upstream solution changed for fedora. If you have something better don't be shy and let me know. This script should start after each reboot and if the cron.daily wasn't run today and the laptop is not on battery, then should it run dailly.
Don't most laptop users hibernate rather than shutting down? Checking at boot time isn't much good on a machine that never reboots except for kernel updates.
Well, my laptop doesn't hibernate :) I try to add other features (like running jobs after hibernate), but not in F-8.
Can we re-open this? It's a serious problem, and clearly hasn't been resolved.
(In reply to comment #15) > Don't most laptop users hibernate rather than shutting down? No they don't. Almost nobody I know actually uses hibernate, because you generally need to authenticate to a whole bunch of resources when you get to your office and the easiest way to make sure it all happens correctly (on our company network anyway) is to shut down and do a clean boot. If you hibernate and then try to use the machine without the expected resources connected, there is no end to the niggly little problems that make it 'not worth the effort'(tm)
#17 now my laptop can hibernate and you're right. The jobs weren't run after hibernation.
I use a script in the cron.hourly, which checks whether cron.daily runs or not, but at the moment I have problem with hibernation. dm-crypt and hibernate doesn't work for some time, but I'll be solving issue.
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
In the rawhide is cron set to run script which checks whether anacron executed daily jobs or not. This script check anacron every hour, so it's probable a laptop will be on power and also hibernation couldn't fail it. This will be fixed in F-11, also in F-10 are some workarounds script.