|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/etc/rc0.d/ |
Upload File : |
#!/bin/sh
#
# readahead: Prereads programs required for startup into memory
#
# chkconfig: 5 96 99
# description: This service causes the programs used during startup \
# to be loaded into memory before they are needed,\
# thus improving startup performance
#
#
# Sanity checks.
[ -x /usr/sbin/readahead ] || exit 0
# Check for > 384 MB
free -m | awk '/Mem:/ {exit ($2 >= 384)?0:1}' || exit 0
# Source function library.
. /etc/rc.d/init.d/functions
start() {
echo -n $"Starting background readahead: "
/usr/sbin/readahead /etc/readahead.files >/dev/null &
echo_success
echo
}
stop() {
/bin/true
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
;;
restart)
stop
start
;;
condrestart)
;;
reload)
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
;;
esac
exit $RETVAL