即使在使用电池(笔记本电脑)时也要运行anacron

当笔记本电脑使用电池运行时,有一种已知的anacron行为无法运行。 有什么方法可以阻止这种行为,无论电源状态如何都运行anacron?

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=152402

http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg560900.html

https://bugs.launchpad.net/ubuntu/+source/anacron/+bug/36816

永远不要更改/usr任何文件! 相反,您可以将文件/etc/default/anacron的一行更改为

ANACRON_RUN_ON_BATTERY_POWER=yes

谢谢@Teresa e Junior。 🙂

我找到了如何做到这一点,并在我的博客文章中进行了总结

http://opensourceresearchtips.blogspot.com/2012/01/linux-anacron-tips.html

要更改anacron的此行为,请执行以下操作:

  sudo gedit /usr/lib/pm-utils/power.d/anacron 

并改为

 case $1 in false) start -q anacron || : ;; true) start -q anacron || : ;; esac