diff options
Diffstat (limited to 'meta-moblin/packages/sreadahead/files/sreadahead-generate.sh')
-rwxr-xr-x | meta-moblin/packages/sreadahead/files/sreadahead-generate.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/meta-moblin/packages/sreadahead/files/sreadahead-generate.sh b/meta-moblin/packages/sreadahead/files/sreadahead-generate.sh new file mode 100755 index 000000000..626d7ccbe --- /dev/null +++ b/meta-moblin/packages/sreadahead/files/sreadahead-generate.sh @@ -0,0 +1,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 |