Blame SOURCES/nfs-utils-1.2.9-exportfs-badentries.patch

851484
diff --git a/support/export/client.c b/support/export/client.c
851484
index dbf47b9..0f7b4fe 100644
851484
--- a/support/export/client.c
851484
+++ b/support/export/client.c
851484
@@ -277,7 +277,7 @@ client_lookup(char *hname, int canonical)
851484
 	if (htype == MCL_FQDN && !canonical) {
851484
 		ai = host_addrinfo(hname);
851484
 		if (!ai) {
851484
-			xlog(L_ERROR, "Failed to resolve %s", hname);
851484
+			xlog(L_WARNING, "Failed to resolve %s", hname);
851484
 			goto out;
851484
 		}
851484
 		hname = ai->ai_canonname;
851484
diff --git a/support/export/export.c b/support/export/export.c
851484
index 6b1d045..ce714d4 100644
851484
--- a/support/export/export.c
851484
+++ b/support/export/export.c
851484
@@ -76,15 +76,22 @@ export_read(char *fname)
851484
 	struct exportent	*eep;
851484
 	nfs_export		*exp;
851484
 
851484
+	int volumes = 0;
851484
+
851484
 	setexportent(fname, "r");
851484
 	while ((eep = getexportent(0,1)) != NULL) {
851484
 		exp = export_lookup(eep->e_hostname, eep->e_path, 0);
851484
-		if (!exp)
851484
-			export_create(eep, 0);
851484
+		if (!exp) {
851484
+			exp = export_create(eep, 0);
851484
+			if (exp)
851484
+				volumes++;
851484
+		}
851484
 		else
851484
 			warn_duplicated_exports(exp, eep);
851484
 	}
851484
 	endexportent();
851484
+	if (volumes == 0)
851484
+		xlog(L_ERROR, "No file systems exported!");
851484
 }
851484
 
851484
 /**
851484
diff --git a/support/export/hostname.c b/support/export/hostname.c
851484
index 5f31aee..cdf9e76 100644
851484
--- a/support/export/hostname.c
851484
+++ b/support/export/hostname.c
851484
@@ -137,11 +137,11 @@ host_pton(const char *paddr)
851484
 	case EAI_NONAME:
851484
 		break;
851484
 	case EAI_SYSTEM:
851484
-		xlog(D_GENERAL, "%s: failed to convert %s: (%d) %m",
851484
+		xlog(L_WARNING, "%s: failed to convert %s: (%d) %m",
851484
 				__func__, paddr, errno);
851484
 		break;
851484
 	default:
851484
-		xlog(D_GENERAL, "%s: failed to convert %s: %s",
851484
+		xlog(L_WARNING, "%s: failed to convert %s: %s",
851484
 				__func__, paddr, gai_strerror(error));
851484
 		break;
851484
 	}
851484
@@ -179,11 +179,11 @@ host_addrinfo(const char *hostname)
851484
 	case 0:
851484
 		return ai;
851484
 	case EAI_SYSTEM:
851484
-		xlog(D_GENERAL, "%s: failed to resolve %s: (%d) %m",
851484
+		xlog(D_PARSE, "%s: failed to resolve %s: (%d) %m",
851484
 				__func__, hostname, errno);
851484
 		break;
851484
 	default:
851484
-		xlog(D_GENERAL, "%s: failed to resolve %s: %s",
851484
+		xlog(D_PARSE, "%s: failed to resolve %s: %s",
851484
 				__func__, hostname, gai_strerror(error));
851484
 		break;
851484
 	}
851484
diff --git a/systemd/nfs-server.service b/systemd/nfs-server.service
851484
index f0e456a..7f60f39 100644
851484
--- a/systemd/nfs-server.service
851484
+++ b/systemd/nfs-server.service
851484
@@ -23,13 +23,13 @@ EnvironmentFile=-/run/sysconfig/nfs-utils
851484
 
851484
 Type=oneshot
851484
 RemainAfterExit=yes
851484
-ExecStartPre=/usr/sbin/exportfs -r
851484
+ExecStartPre=-/usr/sbin/exportfs -r
851484
 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS
851484
 ExecStop=/usr/sbin/rpc.nfsd 0
851484
 ExecStopPost=/usr/sbin/exportfs -au
851484
 ExecStopPost=/usr/sbin/exportfs -f
851484
 
851484
-ExecReload=/usr/sbin/exportfs -r
851484
+ExecReload=-/usr/sbin/exportfs -r
851484
 
851484
 [Install]
851484
 WantedBy=multi-user.target