From de7b80fdf17f5eac2a0847371a55d122cad7f1fc Mon Sep 17 00:00:00 2001 From: Giulio Cervera Date: Sat, 29 Jan 2011 19:04:11 +0100 Subject: cm: bind mount DOWNLOAD_CACHE to /data if /cache is less then 20MB this is useful for all user which want to use cMTD or static partition size (like alpharev) to assign more space to /data reducing /cache size Change-Id: Ib251c9bea1dea50b6c444df977aa605e58008c41 --- prebuilt/common/etc/init.d/05mountsd | 0 prebuilt/common/etc/init.d/06mountdl | 13 +++++++++++++ 2 files changed, 13 insertions(+) mode change 100644 => 100755 prebuilt/common/etc/init.d/05mountsd create mode 100755 prebuilt/common/etc/init.d/06mountdl (limited to 'prebuilt') diff --git a/prebuilt/common/etc/init.d/05mountsd b/prebuilt/common/etc/init.d/05mountsd old mode 100644 new mode 100755 diff --git a/prebuilt/common/etc/init.d/06mountdl b/prebuilt/common/etc/init.d/06mountdl new file mode 100755 index 0000000..bed7019 --- /dev/null +++ b/prebuilt/common/etc/init.d/06mountdl @@ -0,0 +1,13 @@ +#!/system/bin/sh +# +# bind mount /data/local/download to /cache/download if cache +# partition is too small +# + +CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2) +if [ $CACHESIZE -lt 20000 ] +then + mount -o bind /data/local/download /cache/download +fi + +exit 0 -- cgit v1.1