2 # File for starting readahead and readahead-collector
7 base_check_mem=$(grep "MemTotal" /proc/meminfo | sed 's/[ kB]//g' | cut -f2 -d":")
8 base_mem_checked=$(($base_check_mem/1024))
12 if [ "$base_mem_checked" -lt "1000" ]; then
13 printhl "Deactivating Readahead - Not enough memory"
14 elif [ -e /.readahead ]; then
15 stat_busy "Starting readahead-collector - collecting data"
16 /sbin/readahead-collector
17 /usr/bin/kill-readahead &
20 stat_busy "Starting readahead - early read"
21 /sbin/readahead /etc/readahead.d/*.early
28 #Fix some Networkmanager/... problems, if inittab is konfigured for readahead:
29 if [ -e /etc/rc.d/dbus ]; then
36 if [ "$base_mem_checked" -lt "1000" ]; then
37 printhl "Deactivating Readahead - Not enough memory"
38 elif [ -e /.readahead ]; then
39 stat_busy "readahead - waiting $TIMEOUT_SWITCH_TO_LATER seconds to switch to later"
40 # Wait until X and Login Manager started up
41 sleep $TIMEOUT_SWITCH_TO_LATER
42 touch /.switch-collector-to-later
46 stat_busy "Starting readahead - later read"
47 # Give Xorg a bit time
49 /sbin/readahead /etc/readahead.d/*.later
54 add_hook sysinit_start readahead-early
55 add_hook sysinit_end readahead-dbus
56 add_hook multi_start readahead-later