am 8ac50107: merge from open-source master

Merge commit '8ac50107a21b96f6e9c77ab23820d164543c5bbe' into kraken

* commit '8ac50107a21b96f6e9c77ab23820d164543c5bbe':
  Allow 'adb pull' to pull symlinked files
diff --git a/adb/adb.c b/adb/adb.c
index a34dd71..2436387 100644
--- a/adb/adb.c
+++ b/adb/adb.c
@@ -144,9 +144,6 @@
 void handle_online(void)
 {
     D("adb: online\n");
-#if !ADB_HOST
-    property_set("adb.connected","1");
-#endif
 }
 
 void handle_offline(atransport *t)
@@ -154,9 +151,6 @@
     D("adb: offline\n");
     //Close the associated usb
     run_transport_disconnects(t);
-#if !ADB_HOST
-    property_set("adb.connected","");
-#endif
 }
 
 #if TRACE_PACKETS
diff --git a/init/init.c b/init/init.c
index 4d98cc2..65d3d84 100755
--- a/init/init.c
+++ b/init/init.c
@@ -929,6 +929,9 @@
 
         /* execute all the boot actions to get us started */
     action_for_each_trigger("init", action_add_queue_tail);
+    action_for_each_trigger("early-fs", action_add_queue_tail);
+    action_for_each_trigger("fs", action_add_queue_tail);
+    action_for_each_trigger("post-fs", action_add_queue_tail);
     drain_action_queue();
 
         /* read any property files on system or data and
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index 7ac991c..ed13060 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -37,6 +37,7 @@
 $(file) : $(LOCAL_PATH)/init.rc | $(ACP)
 	$(transform-prebuilt-to-target)
 ALL_PREBUILT += $(file)
+$(INSTALLED_RAMDISK_TARGET): $(file)
 endif
 
 # Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 63769f5..04e3960 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -80,13 +80,16 @@
     # 5.0 %
     write /dev/cpuctl/bg_non_interactive/cpu.shares 52
 
+on fs
 # mount mtd partitions
     # Mount /system rw first to give the filesystem a chance to save a checkpoint
     mount yaffs2 mtd@system /system
     mount yaffs2 mtd@system /system ro remount
-
-    # We chown/chmod /data again so because mount is run as root + defaults
     mount yaffs2 mtd@userdata /data nosuid nodev
+    mount yaffs2 mtd@cache /cache nosuid nodev
+
+on post-fs
+    # We chown/chmod /data again so because mount is run as root + defaults
     chown system system /data
     chmod 0771 /data
 
@@ -110,7 +113,6 @@
     write /proc/apanic_console 1
 
     # Same reason as /data above
-    mount yaffs2 mtd@cache /cache nosuid nodev
     chown system cache /cache
     chmod 0770 /cache
 
diff --git a/toolbox/Android.mk b/toolbox/Android.mk
index 05b2a34..9349276 100644
--- a/toolbox/Android.mk
+++ b/toolbox/Android.mk
@@ -53,7 +53,7 @@
 	uptime \
 	vmstat \
 	nandread \
-        ionice
+	ionice
 
 LOCAL_SRC_FILES:= \
 	toolbox.c \