Fri Aug 23 2002 Jens Petersen <petersen@redhat.com> 2.3-23
- delay the start of anacron by 60min to make startup more pleasant
(#68304)
- at startup run jobs serially and nice 19 to reduce load (#65870, #68304)
- spec file now in utf-8
- dont install non-existant NEWS file
- silence make include warnings
63 lines
941 B
Bash
Executable file
63 lines
941 B
Bash
Executable file
#!/bin/sh
|
|
# Startup script for anacron
|
|
#
|
|
# chkconfig: 2345 95 05
|
|
# description: Run cron jobs that were left out due to downtime
|
|
|
|
# Source function library.
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
[ -f /usr/sbin/anacron ] || exit 0
|
|
|
|
prog="anacron"
|
|
|
|
start() {
|
|
echo -n $"Starting $prog: "
|
|
daemon +19 anacron -s
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/anacron
|
|
echo
|
|
return $RETVAL
|
|
}
|
|
|
|
stop() {
|
|
if test "x`pidof anacron`" != x; then
|
|
echo -n $"Stopping $prog: "
|
|
killproc anacron
|
|
echo
|
|
fi
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/anacron
|
|
return $RETVAL
|
|
}
|
|
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
|
|
stop)
|
|
stop
|
|
;;
|
|
|
|
status)
|
|
status anacron
|
|
;;
|
|
restart)
|
|
stop
|
|
start
|
|
;;
|
|
condrestart)
|
|
if test "x`pidof anacron`" != x; then
|
|
stop
|
|
start
|
|
fi
|
|
;;
|
|
|
|
*)
|
|
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
|
|
exit 1
|
|
|
|
esac
|
|
|
|
exit 0
|