blob: ffadb3ea25baba6f7c364b427a6297fe229b3493 [file] [log] [blame]
Steve Kondik2dc24f62010-07-06 00:19:10 -04001#!/system/bin/sh
2#
3# Compcache manager
4# shade@chemlab.org (cyanogen)
5#
6
7DEV=/dev/block/ramzswap0
8MODULE=ramzswap
9MODULES_DIR=/system/modules/lib/modules/`uname -r`
10
11case "$1" in
12 start)
13 echo 3 > /proc/sys/vm/drop_caches
14 modprobe $MODULE
15 rzscontrol $DEV --init
16 swapon $DEV
17 ;;
18
19 stop)
20 swapoff $DEV >/dev/null 2>&1
21 rmmod $MODULE >/dev/null 2>&1
22 ;;
23 stats)
24 rzscontrol $DEV --stats
25 ;;
26 *)
27 echo "Usage: $0 {start|stop|stats}"
28 exit 1
29esac
30
31exit 0
32