replicant-vendor_replicant/prebuilt/common/etc/init.d/06mountdl
Giulio Cervera de7b80fdf1 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
2011-01-29 19:04:18 +01:00

14 lines
272 B
Bash
Executable File

#!/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