blob: c61ce43964b89803682887c314da39572da0032d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/sh
[ -x /sbin/blockdev ] || exit $NA
readahead() {
# the intent here is to iterate through all filesystems
# mounted on a local block device. It Works For The Maintainer(tm).
# More sophistication in figuring out what exactly is a local block device
# would be welcome.
for dev in $(awk '/^\/dev\// {print $1}'</etc/mtab); do
/sbin/blockdev --setfra $1 "$dev"
done
}
case $1 in
true) readahead 3072 ;;
false) readahead 256 ;;
*) exit $NA ;;
esac
exit 0
|