Wait to mount until after fstab processed

The necessity to process fstab twice stems from mounting partitions
while still processing. Instead, wait to finish setup of /data, /cache
and storage parameters until after fstab has been processed (once).

Change-Id: Id77e1edbab5eb68a7cd4a1f34953d819a043d47a
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index cc36b2e..320944c 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -92,29 +92,35 @@
 			fstab_line[strlen(fstab_line)] = '\n';
 
 		TWPartition* partition = new TWPartition();
-		if (partition->Process_Fstab_Line(fstab_line, Display_Error)) {
-			if (partition->Is_Storage) {
-				++storageid;
-				partition->MTP_Storage_ID = storageid;
-			}
-			if (!settings_partition && partition->Is_Settings_Storage && partition->Is_Present) {
-				settings_partition = partition;
-			} else {
-				partition->Is_Settings_Storage = false;
-			}
-			if (!andsec_partition && partition->Has_Android_Secure && partition->Is_Present) {
-				andsec_partition = partition;
-			} else {
-				partition->Has_Android_Secure = false;
-			}
+		if (partition->Process_Fstab_Line(fstab_line, Display_Error))
 			Partitions.push_back(partition);
-		} else {
+		else
 			delete partition;
-		}
 
 		memset(fstab_line, 0, sizeof(fstab_line));
 	}
 	fclose(fstabFile);
+
+	std::vector<TWPartition*>::iterator iter;
+	for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
+		(*iter)->Partition_Post_Processing(Display_Error);
+
+		if ((*iter)->Is_Storage) {
+			++storageid;
+			(*iter)->MTP_Storage_ID = storageid;
+		}
+
+		if (!settings_partition && (*iter)->Is_Settings_Storage && (*iter)->Is_Present)
+			settings_partition = (*iter);
+		else
+			(*iter)->Is_Settings_Storage = false;
+
+		if (!andsec_partition && (*iter)->Has_Android_Secure && (*iter)->Is_Present)
+			andsec_partition = (*iter);
+		else
+			(*iter)->Has_Android_Secure = false;
+	}
+
 	if (!datamedia && !settings_partition && Find_Partition_By_Path("/sdcard") == NULL && Find_Partition_By_Path("/internal_sd") == NULL && Find_Partition_By_Path("/internal_sdcard") == NULL && Find_Partition_By_Path("/emmc") == NULL) {
 		// Attempt to automatically identify /data/media emulated storage devices
 		TWPartition* Dat = Find_Partition_By_Path("/data");
@@ -129,7 +135,6 @@
 		}
 	}
 	if (!settings_partition) {
-		std::vector<TWPartition*>::iterator iter;
 		for (iter = Partitions.begin(); iter != Partitions.end(); iter++) {
 			if ((*iter)->Is_Storage) {
 				settings_partition = (*iter);