Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > 0cf914b1d3ac4f7b35c124ba3c9bbc95 > files > 2

cronie-anacron-1.4.4-1.fc13.i686.rpm

#!/bin/bash
#in case file doesn't exist 
if test -x /var/spool/anacron/cron.daily; then
    day=`cat /var/spool/anacron/cron.daily`
fi
if [ `date +%Y%m%d` = "$day" ]; then
    exit 0;
fi

# in case anacron is already running,
# there will be log (daemon won't be running twice).
if test -x /usr/bin/on_ac_power; then
    /usr/bin/on_ac_power &> /dev/null
    if test $? -eq 1; then
    exit 0
    fi
fi
/usr/sbin/anacron -s