am 6484f3d1: Merge "Change pre-recovery into two services" into mnc-dev

* commit '6484f3d1cb4078c7525e23d16c7e7bcd90afa653':
  Change pre-recovery into two services
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 29c40a3..91725d5 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -197,9 +197,9 @@
     # We restorecon /cache in case the cache partition has been reset.
     restorecon_recursive /cache
 
-    # This may have been created by the recovery system with odd permissions
-    chown system cache /cache/recovery
-    chmod 0770 /cache/recovery
+    # Create /cache/recovery in case it's not there. It'll also fix the odd
+    # permissions if created by the recovery system.
+    mkdir /cache/recovery 0770 system cache
 
     #change permissions on vmallocinfo so we can grab it from bugreports
     chown root log /proc/vmallocinfo
@@ -652,7 +652,12 @@
     disabled
     oneshot
 
-service pre-recovery /system/bin/uncrypt
+service uncrypt /system/bin/uncrypt
+    class main
+    disabled
+    oneshot
+
+service pre-recovery /system/bin/uncrypt --reboot
     class main
     disabled
     oneshot