#!/sbin/runscript # Copyright 2005 Robin H. Johnson # Distributed under the terms of the GNU General Public License v2 # $Header: $ rl_type="${SVCNAME#*.}" [ "${rl_type}" = "readahead-list" ] && rl_type="main" eval rl_list="\$READAHEAD_LIST_call_${rl_type}" depend() { if [ "${rl_type}" = "audit" ] || [ "${rl_type}" = "early" ] ; then # sysinit runlevel need udev-mount before dmesg else # boot runlevel need localmount before hostname bootmisc consolefont fi } start() { ebegin "readahead($rl_type)" cmd="/sbin/readahead-list ${rl_list}" if [ "${rl_type}" = "audit" ] ; then auditctl -b 65536 -r 1024 auditctl -a exit,always -S open -S read -k bootup -F dir=/etc auditctl -a exit,always -S open -S read -k bootup -F dir=/bin auditctl -a exit,always -S open -S read -k bootup -F dir=/sbin auditctl -a exit,always -S open -S read -k bootup -F dir=/usr auditctl -a exit,always -S open -S read -k bootup -F dir=/var auditctl -a exit,always -S open -S read -k bootup -F dir=/lib auditctl -a exit,always -S open -S read -k bootup -F dir=/lib32 auditctl -a exit,always -S open -S read -k bootup -F dir=/lib64 # or alternative: # auditctl -w /etc -p rx -k bootup # auditctl -w /bin -p rx -k bootup # auditctl -w /sbin -p rx -k bootup # auditctl -w /usr -p rx -k bootup # auditctl -w /var -p rx -k bootup # auditctl -w /lib -p rx -k bootup # auditctl -w /lib32 -p rx -k bootup # auditctl -w /lib64 -p rx -k bootup elif [ "${rl_type}" = "lsof" ] ; then /usr/sbin/readahead-list-lsof /etc/readahead-list/lsof.list & elif [ "${rl_type}" = "early" ] ; then ${cmd} & # which/ionice(/usr/bin) not available here, yet # if you have /usr on your root-partition you can safely remove this and the above two lines. else IONICE=$(which ionice) if [ -x "$IONICE" ] ; then $IONICE -c3 ${cmd} & else ${cmd} & fi fi eend $? } # vim: ts=4 sw=4