summaryrefslogtreecommitdiffstats
path: root/meta-moblin/packages/sreadahead/files/sreadahead-generate.sh
blob: 626d7ccbe6b6eff6b00a22d45e56cbd5726f2cca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#

if [ -e /etc/readahead.packed ]; then
    exit 0
fi

if [ -e /etc/readahead.packed.first ]; then
    mv /etc/readahead.packed.first /etc/readahead.packed.second
    exit 0
fi

# That's our second boot, we can generate the sreadahead file list
if [ -e /etc/readahead.packed.second ]; then
    rm -f /etc/readahead.packed.second
    find / -type f > filelist.txt

    /sbin/generate_filelist filelist.txt
    rm filelist.txt
    mv readahead.packed /etc/
fi