File 0003-mountd-delay-reading-etab-until-first-request-arrive.patch of Package nfs-utils.4261

From c93807b90b298bfd9a24496f911ca282f21b547b Mon Sep 17 00:00:00 2001
From: NeilBrown <>
Date: Fri, 14 Oct 2016 14:56:00 +1100
Subject: [PATCH] mountd: delay reading etab until first request arrives.

Reading etab may require hostname lookup, so it is not reliable
until the network is active.
But we want mountd to start before that so that it is ready
when the very first NFS request arrives.
So delay reading etab until that request arrives, by which time
the network must be online so hopefully hostname look will be reliable.

An alternate would be to delay starting mountd and nfsd until the
network is on-line, but that will often be an unnecessary delay.

Signed-off-by: NeilBrown <>
 utils/mountd/mountd.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/utils/mountd/mountd.c
+++ b/utils/mountd/mountd.c
@@ -861,7 +861,8 @@ main(int argc, char **argv)
 	sa.sa_handler = sig_hup;
 	sigaction(SIGHUP, &sa, NULL);
-	auth_init(export_file);
+	if (!new_cache)
+		auth_init(export_file);
 	if (!foreground) {
 		/* We first fork off a child. */
openSUSE Build Service is sponsored by