1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008 OpenWrt.org
7 config_get
"size_kbytes" "$section" "size_kbytes"
8 config_get_bool
"enabled" "$section" "enabled" '1'
9 if [ "$enabled" -gt 0 ]; then
10 if [ "`lsmod | grep 'compcache'`" != "" ]; then
11 echo "compcache allready loaded"
15 insmod compcache compcache_size_kbytes
=$size_kbytes
22 config_get_bool
"enabled" "$section" "enabled" '1'
23 if [ "$enabled" -gt 0 ]; then
24 [ "`cat /proc/swaps | grep 'ramzswap0'`" != "" ] && swapoff
/dev
/ramzswap0
25 [ "`lsmod | grep 'compcache'`" != "" ] && rmmod compcache
> /dev
/null
26 [ "`lsmod | grep 'lzo1x'`" != "" ] && rmmod lzo1x
> /dev
/null
27 [ "`lsmod | grep 'xvmalloc'`" != "" ] && rmmod xvmalloc
> /dev
/null
32 config_load
"compcache"
33 config_foreach load_modules
"compcache"
37 config_load
"compcache"
38 config_foreach remove_modules
"compcache"