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