Blame SOURCES/nfs-utils-2.3.3-statd-force.patch

bc9fd4
diff -up nfs-utils-2.3.3/nfs.conf.orig nfs-utils-2.3.3/nfs.conf
bc9fd4
--- nfs-utils-2.3.3/nfs.conf.orig	2019-03-05 10:30:28.100560625 -0500
bc9fd4
+++ nfs-utils-2.3.3/nfs.conf	2019-03-05 10:35:28.702004199 -0500
bc9fd4
@@ -64,6 +64,7 @@ use-gss-proxy=1
bc9fd4
 #
bc9fd4
 [sm-notify]
bc9fd4
 # debug=0
bc9fd4
+# force=0
bc9fd4
 # retry-time=900
bc9fd4
 # outgoing-port=
bc9fd4
 # outgoing-addr=
bc9fd4
diff -up nfs-utils-2.3.3/utils/statd/sm-notify.c.orig nfs-utils-2.3.3/utils/statd/sm-notify.c
bc9fd4
--- nfs-utils-2.3.3/utils/statd/sm-notify.c.orig	2019-03-05 10:30:28.070560401 -0500
bc9fd4
+++ nfs-utils-2.3.3/utils/statd/sm-notify.c	2019-03-05 10:35:28.703004207 -0500
bc9fd4
@@ -49,6 +49,7 @@
bc9fd4
 #define NLM_END_GRACE_FILE	"/proc/fs/lockd/nlm_end_grace"
bc9fd4
 
bc9fd4
 int lift_grace = 1;
bc9fd4
+int force = 0;
bc9fd4
 
bc9fd4
 struct nsm_host {
bc9fd4
 	struct nsm_host *	next;
bc9fd4
@@ -480,19 +481,10 @@ nsm_lift_grace_period(void)
bc9fd4
 	close(fd);
bc9fd4
 	return;
bc9fd4
 }
bc9fd4
-
bc9fd4
-int
bc9fd4
-main(int argc, char **argv)
bc9fd4
+inline static void 
bc9fd4
+read_nfsconf(char **argv)
bc9fd4
 {
bc9fd4
-	int	c, sock, force = 0;
bc9fd4
-	char *	progname;
bc9fd4
-	char *	s;
bc9fd4
-
bc9fd4
-	progname = strrchr(argv[0], '/');
bc9fd4
-	if (progname != NULL)
bc9fd4
-		progname++;
bc9fd4
-	else
bc9fd4
-		progname = argv[0];
bc9fd4
+	char *s;
bc9fd4
 
bc9fd4
 	conf_init_file(NFS_CONFFILE);
bc9fd4
 	xlog_from_conffile("sm-notify");
bc9fd4
@@ -500,10 +492,27 @@ main(int argc, char **argv)
bc9fd4
 	opt_srcport = conf_get_str("sm-notify", "outgoing-port");
bc9fd4
 	opt_srcaddr = conf_get_str("sm-notify", "outgoing-addr");
bc9fd4
 	lift_grace = conf_get_bool("sm-notify", "lift-grace", lift_grace);
bc9fd4
+
bc9fd4
 	s = conf_get_str("statd", "state-directory-path");
bc9fd4
 	if (s && !nsm_setup_pathnames(argv[0], s))
bc9fd4
 		exit(1);
bc9fd4
 	opt_update_state = conf_get_bool("sm-notify", "update-state", opt_update_state);
bc9fd4
+	force = conf_get_bool("sm-notify", "force", force);
bc9fd4
+}
bc9fd4
+
bc9fd4
+int
bc9fd4
+main(int argc, char **argv)
bc9fd4
+{
bc9fd4
+	int	c, sock;
bc9fd4
+	char *	progname;
bc9fd4
+
bc9fd4
+	progname = strrchr(argv[0], '/');
bc9fd4
+	if (progname != NULL)
bc9fd4
+		progname++;
bc9fd4
+	else
bc9fd4
+		progname = argv[0];
bc9fd4
+
bc9fd4
+	read_nfsconf(argv);
bc9fd4
 
bc9fd4
 	while ((c = getopt(argc, argv, "dm:np:v:P:f")) != -1) {
bc9fd4
 		switch (c) {