Blame SOURCES/autofs-5.1.2-dont-return-until-after-master-map-retry-read.patch

304803
autofs-5.1.2 - don't return until after master map retry read
304803
304803
From: Ian Kent <raven@themaw.net>
304803
304803
The master map read retry needs to be done before returning success
304803
at startup or there can be problems trying to access automount mounts
304803
before they are mounted.
304803
304803
Signed-off-by: Ian Kent <raven@themaw.net>
304803
---
304803
 CHANGELOG          |    1 +
304803
 daemon/automount.c |   31 ++++++++++---------------------
304803
 2 files changed, 11 insertions(+), 21 deletions(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -211,6 +211,7 @@
304803
 - fix included master map not found return.
304803
 - dont exit on master map read fail timeout.
304803
 - set sane default master read wait timeout.
304803
+- don't return until after master map retry read.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/daemon/automount.c
304803
+++ autofs-5.0.7/daemon/automount.c
304803
@@ -2483,27 +2483,6 @@ int main(int argc, char *argv[])
304803
 
304803
 	master_read = master_read_master(master_list, age, 0);
304803
 	if (!master_read) {
304803
-		if (foreground)
304803
-			logerr("%s: failed to read master map, "
304803
-			       "will retry!",
304803
-			       program);
304803
-		else
304803
-			logerr("%s: failed to read master map, "
304803
-			       "will retry in background!",
304803
-			       program);
304803
-	}
304803
-
304803
-	/*
304803
-	 * Mmm ... reset force unlink umount so we don't also do this
304803
-	 * in future when we receive a HUP signal.
304803
-	 */
304803
-	do_force_unlink = 0;
304803
-
304803
-	st_stat = 0;
304803
-	res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
304803
-	close(start_pipefd[1]);
304803
-
304803
-	if (!master_read) {
304803
 		/*
304803
 		 * Read master map, waiting until it is available, unless
304803
 		 * a signal is received, in which case exit returning an
304803
@@ -2521,6 +2500,16 @@ int main(int argc, char *argv[])
304803
 		}
304803
 	}
304803
 
304803
+	/*
304803
+	 * Mmm ... reset force unlink umount so we don't also do this
304803
+	 * in future when we receive a HUP signal.
304803
+	 */
304803
+	do_force_unlink = 0;
304803
+
304803
+	st_stat = 0;
304803
+	res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
304803
+	close(start_pipefd[1]);
304803
+
304803
 	state_mach_thid = pthread_self();
304803
 	statemachine(NULL);
304803