diff options
author | Emilio López <turl@tuxfamily.org> | 2012-05-10 14:25:23 +0000 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-05-15 16:13:23 +0100 |
commit | 67778d1f8ae1c1d4b23237b3a671f208bff8c3b3 (patch) | |
tree | f650c6cd5b7222cff83b1044f106e81573300279 | |
parent | 8ccb9e8397c31bd44c317d83649db1af61d59809 (diff) | |
download | vendor_replicant-67778d1f8ae1c1d4b23237b3a671f208bff8c3b3.zip vendor_replicant-67778d1f8ae1c1d4b23237b3a671f208bff8c3b3.tar.gz vendor_replicant-67778d1f8ae1c1d4b23237b3a671f208bff8c3b3.tar.bz2 |
Make compcache script fail-safe
On clean installs, the script failed because the properties weren't set.
Have them default to 0 to fix these issues.
Change-Id: Idefc28d1bd79252b44dfb2f9d1f6ff8ed97b1dd1
-rwxr-xr-x | prebuilt/common/bin/handle_compcache | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/prebuilt/common/bin/handle_compcache b/prebuilt/common/bin/handle_compcache index 44ab0b7..5350214 100755 --- a/prebuilt/common/bin/handle_compcache +++ b/prebuilt/common/bin/handle_compcache @@ -5,17 +5,17 @@ # MEMTOTAL=$( awk '{ if ($1 eq "MemTotal:") print $2 ;exit }' </proc/meminfo ) -if [ `getprop persist.service.compcache` == 1 ]; +if [ `getprop persist.service.compcache 0` == 1 ]; then - PROP=`getprop ro.compcache.default` + PROP=`getprop ro.compcache.default 0` setprop persist.service.compcache $PROP fi if [ -e /data/property/persist.service.compcache ]; then - PROP=`getprop persist.service.compcache` + PROP=`getprop persist.service.compcache 0` else - PROP=`getprop ro.compcache.default` + PROP=`getprop ro.compcache.default 0` setprop persist.service.compcache $PROP fi |