Load the persistent properties after decrypting the /data partition

Fix for bug 3415286.  The persistent properties are normally read early
in the boot process after /data is mounted.  However, for an encrypted
system, at that point /data is a tmpfs ramdisk.  This change adds a new
command to init (load_persist_props) to read the persistent properties,
and adds an action to init.rc to load the persistent properties.  This
action is triggered by setting a property in vold, but that's in a
different CL.

Change-Id: I74b3057974ee6029c29d956b76fef5566700d471
diff --git a/init/builtins.c b/init/builtins.c
index d9a9634..f2f76b7 100644
--- a/init/builtins.c
+++ b/init/builtins.c
@@ -286,7 +286,6 @@
     unsigned flags = 0;
     int n, i;
     int wait = 0;
-    char *prop;
 
     for (n = 4; n < nargs; n++) {
         for (i = 0; mount_flags[i].name; i++) {
@@ -416,6 +415,8 @@
      * unencrypted, and also trigger the action for a nonencrypted system.
      */
     if (!strcmp(target, DATA_MNT_POINT)) {
+        const char *prop;
+
         prop = property_get("ro.crypto.state");
         if (! prop) {
             prop = "notset";
@@ -631,6 +632,14 @@
     return -1;
 }
 
+int do_load_persist_props(int nargs, char **args) {
+    if (nargs == 1) {
+        load_persist_props();
+        return 0;
+    }
+    return -1;
+}
+
 int do_wait(int nargs, char **args)
 {
     if (nargs == 2) {