summaryrefslogtreecommitdiff
path: root/hooks-addons/05compcache
diff options
context:
space:
mode:
authorDimitri John Ledkov <dimitri.ledkov@canonical.com>2013-12-31 13:28:27 +0000
committerDimitri John Ledkov <dimitri.ledkov@canonical.com>2013-12-31 13:28:27 +0000
commit9b4f2dd391d79f67fbff8627d7217f003105dfab (patch)
tree82a07d69e72baa942283bc332b5d4456a52fbc1a /hooks-addons/05compcache
parent85e11fb132b2b81b50a45647b070e8f6fd648d65 (diff)
parentde57566ca38d821454f8df4dfe36f4820c8fbaa4 (diff)
Merge tag 'tcos-0.89.93' into dgit/sidHEADdebian/0.89.93master
0.89.93
Diffstat (limited to 'hooks-addons/05compcache')
-rw-r--r--hooks-addons/05compcache9
1 files changed, 6 insertions, 3 deletions
diff --git a/hooks-addons/05compcache b/hooks-addons/05compcache
index 586cc6a..fc12230 100644
--- a/hooks-addons/05compcache
+++ b/hooks-addons/05compcache
@@ -35,6 +35,9 @@ fi
quiet=n
+. /conf/tcos.conf
+. /conf/tcos-run-functions
+
# find total amount of available ram
TOTAL_RAM=\$(grep MemTotal /proc/meminfo |tr -d ': [A-Z][a-z]')
@@ -52,13 +55,13 @@ if [ "\${kbytes}" -gt "\${AVALAIBLE_RAM}" ]; then
fi
-if modprobe --list zram | grep -q zram; then
- modprobe zram num_devices=1
+if tcos_find_module "zram"; then
+ modprobe zram
echo \$((1024*\$kbytes)) > /sys/block/zram0/disksize
/sbin/mkswap /dev/zram0 >/dev/null 2>&1
/sbin/swapon -p 100 /dev/zram0 >/dev/null 2>&1
else
- modprobe -q --ignore-install ramzswap disksize_kb="\$kbytes"
+ modprobe -q --ignore-install ramzswap
fi
EOF