4 |
- |
1 |
# readahead-disable-services - readahead-disable-services
|
|
|
2 |
#
|
|
|
3 |
# disable all services, which interfere with readahead-collector
|
|
|
4 |
|
|
|
5 |
start on stopped rcS
|
|
|
6 |
|
|
|
7 |
script
|
|
|
8 |
set +e
|
|
|
9 |
. /etc/sysconfig/readahead
|
|
|
10 |
[ -f /dev/shm/readahead-collector-started ] || exit 0
|
|
|
11 |
[ -z "$READAHEAD_DELAY_SERVICES" ] && exit 0
|
|
|
12 |
runlevel=$(/sbin/runlevel| (read a b; echo $b))
|
|
|
13 |
# delay startup of services, which do not play nicely with readahead
|
|
|
14 |
for service in "$READAHEAD_DELAY_SERVICES"; do
|
|
|
15 |
if /sbin/chkconfig --level $runlevel $service ; then
|
|
|
16 |
echo "<6>readahead-disable-service: delaying service $service" > /dev/kmsg
|
|
|
17 |
/sbin/chkconfig --level $runlevel $service off
|
|
|
18 |
> /var/lock/subsys/delay-$runlevel-$service
|
|
|
19 |
fi
|
|
|
20 |
done
|
|
|
21 |
exit 0
|
|
|
22 |
end script
|