#!/sbin/runscript # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/sys-apps/preload/files/init.d-preload,v 1.6 2008/10/28 13:04:57 darkside Exp $ depend() { after localmount xdm } start() { ebegin "Starting preload" start-stop-daemon --start --quiet --background \ --make-pidfile --pidfile ${PIDFILE} --exec /usr/sbin/preload -- \ -l ${PRELOAD_LOGFILE:-/var/log/preload.log} -V ${PRELOAD_VERBOSITY:-4} \ -n ${PRELOAD_NICE:-15} -s ${PRELOAD_STATEFILE:-""} -f IONICE="$(command -v ionice)" if [ -x "${IONICE}" -a -n "${IONICE_OPTS}" ]; then einfo "ionicing preload" "${IONICE}" "${IONICE_OPTS}" -p $(cat ${PIDFILE}) fi eend $? } stop() { ebegin "Stopping preload (may take awhile)" start-stop-daemon --stop --retry 120 --quiet --pidfile ${PIDFILE} eend $? }