diff options
author | Giulio Cervera <giulio.cervera@gmail.com> | 2011-01-29 19:04:11 +0100 |
---|---|---|
committer | Giulio Cervera <giulio.cervera@gmail.com> | 2011-01-29 19:04:18 +0100 |
commit | de7b80fdf17f5eac2a0847371a55d122cad7f1fc (patch) | |
tree | 23487654c753168eeaa29494078de9acd068e272 /prebuilt/common/etc | |
parent | d651911c89f8e0d8a54e0354b82eeeace5764dfd (diff) | |
download | vendor_replicant-de7b80fdf17f5eac2a0847371a55d122cad7f1fc.zip vendor_replicant-de7b80fdf17f5eac2a0847371a55d122cad7f1fc.tar.gz vendor_replicant-de7b80fdf17f5eac2a0847371a55d122cad7f1fc.tar.bz2 |
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
Diffstat (limited to 'prebuilt/common/etc')
-rwxr-xr-x[-rw-r--r--] | prebuilt/common/etc/init.d/05mountsd | 0 | ||||
-rwxr-xr-x | prebuilt/common/etc/init.d/06mountdl | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/prebuilt/common/etc/init.d/05mountsd b/prebuilt/common/etc/init.d/05mountsd index b34b171..b34b171 100644..100755 --- a/prebuilt/common/etc/init.d/05mountsd +++ b/prebuilt/common/etc/init.d/05mountsd 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 |