~hexperides/hexperides/main

« back to all changes in this revision

Viewing changes to etc/apm/event.d/anacron

  • Committer: RicardoCardenes
  • Date: 2005-06-10 15:49:54 UTC
  • Revision ID: RicardoCardenes-8124e411ce351a4aa8b751fa1054a3c0e680bad5
movemos el contenido actual dentro de "trunk"

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# This script makes anacron jobs start to run when the machine is
 
4
# plugged into AC power, or woken up.  For a laptop, these are the 
 
5
# closest parallels to turning on a desktop.
 
6
 
 
7
# The /etc/init.d/anacron script now normally tries to avoid running
 
8
# anacron unless on AC power, so as to avoid running down the battery.
 
9
# (Things like the slocate updatedb cause a lot of IO.)  Rather than
 
10
# trying to second-guess which events reflect having or not having
 
11
# power, we just try to run anacron every time and let it abort if
 
12
# there's no AC.  You'll see a message on the cron syslog facility 
 
13
# (typically /var/log/cron) if it does run.
 
14
 
 
15
case "$1,$2" in
 
16
change,power|resume,*)
 
17
    /usr/sbin/invoke-rc.d anacron start >/dev/null   
 
18
    ;;
 
19
esac