Only enable/disable compcache at boot

Signed-off-by: Eddie Ringle <eddie.ringle@gmail.com>
diff --git a/prebuilt/common/bin/handle_compcache b/prebuilt/common/bin/handle_compcache
new file mode 100755
index 0000000..52b84d9
--- /dev/null
+++ b/prebuilt/common/bin/handle_compcache
@@ -0,0 +1,17 @@
+#!/system/bin/sh
+#
+# Compcache handler
+# Decides whether or not Compcache is enabled
+#
+
+PROP=$(cat /data/property/persist.service.compcache)
+
+if [ $PROP == 1 ]
+then
+  `dirname $0`/compcache start
+else
+  `dirname $0`/compcache stop
+fi
+
+exit 0
+
diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc
index ea900c4..f113f1d 100644
--- a/prebuilt/common/etc/init.local.rc
+++ b/prebuilt/common/etc/init.local.rc
@@ -1,19 +1,5 @@
 # CyanogenMod Extras
 
-# Compcache
-service compcache_on /system/bin/logwrapper /system/bin/sh /system/bin/compcache start
-    disabled
-    oneshot
-
-service compcache_off /system/bin/logwrapper /system/bin/sh /system/bin/compcache stop
-    disabled
-    oneshot
-
-on property:persist.service.compcache=1
-    start compcache_on
-
-on property:persist.service.compcache=0
-    start compcache_off
-
-
-
+on boot
+    # Compcache
+    exec /system/bin/handle_compcache
diff --git a/products/common.mk b/products/common.mk
index 7ba3bb2..ff87cdc 100644
--- a/products/common.mk
+++ b/products/common.mk
@@ -75,6 +75,7 @@
     vendor/cyanogen/prebuilt/common/etc/init.d/03firstboot:system/etc/init.d/03firstboot \
     vendor/cyanogen/prebuilt/common/etc/init.d/04modules:system/etc/init.d/04modules \
     vendor/cyanogen/prebuilt/common/etc/init.d/20userinit:system/etc/init.d/20userinit \
+    vendor/cyanogen/prebuilt/common/bin/handle_compcache:system/bin/handle_compcache \
     vendor/cyanogen/prebuilt/common/bin/compcache:system/bin/compcache \
     vendor/cyanogen/prebuilt/common/bin/fix_permissions:system/bin/fix_permissions \
     vendor/cyanogen/prebuilt/common/bin/sysinit:system/bin/sysinit \