forked from pool/nfs-utils
44 lines
1.3 KiB
Diff
44 lines
1.3 KiB
Diff
|
--- utils/statd/monitor.c
|
||
|
+++ utils/statd/monitor.c 2002/08/01 14:38:29
|
||
|
@@ -233,7 +233,18 @@
|
||
|
dprintf(L_DEBUG, "UNMONITORING %s for %s",
|
||
|
mon_name, my_name);
|
||
|
nlist_free(&rtnl, clnt);
|
||
|
+ /* Do not unlink the monitor file. There are
|
||
|
+ * cases when a lock is cleared locally on the
|
||
|
+ * NFS client, but not on the server. We
|
||
|
+ * need to make sure these get freed at least
|
||
|
+ * on the next boot.
|
||
|
+ * We might also want to make an attempt in
|
||
|
+ * the kernel to do a NLM_FREE_ALL call the next time
|
||
|
+ * we mount something from this host.
|
||
|
+ */
|
||
|
+#if 0
|
||
|
xunlink(SM_DIR, mon_name, 1);
|
||
|
+#endif
|
||
|
|
||
|
return (&result);
|
||
|
} else
|
||
|
--- utils/statd/state.c
|
||
|
+++ utils/statd/state.c 2002/08/01 14:38:29
|
||
|
@@ -59,6 +59,7 @@
|
||
|
if (MY_NAME == NULL) {
|
||
|
char fullhost[SM_MAXSTRLEN + 1];
|
||
|
struct hostent *hostinfo;
|
||
|
+ char *dot;
|
||
|
|
||
|
if (gethostname (fullhost, SM_MAXSTRLEN) == -1)
|
||
|
die ("gethostname: %s", strerror (errno));
|
||
|
@@ -69,6 +70,11 @@
|
||
|
strncpy (fullhost, hostinfo->h_name, sizeof (fullhost) - 1);
|
||
|
fullhost[sizeof (fullhost) - 1] = '\0';
|
||
|
}
|
||
|
+
|
||
|
+ /* SuSE hack: strip off .local domain; the server will surely
|
||
|
+ * be unable to resolve the name */
|
||
|
+ if ((dot = strrchr(fullhost, '.')) && !strcasecmp(dot, ".local"))
|
||
|
+ *dot = '\0';
|
||
|
|
||
|
MY_NAME = xstrdup (fullhost);
|
||
|
}
|