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