cvsdist 4bc0e7f
#
cvsdist 4bc0e7f
# Make sure check_new_cache() is looking in the right place
cvsdist 4bc0e7f
#
cvsdist 4bc0e7f
--- src/support/nfs/cacheio.c.org	2003-08-04 00:12:16.000000000 -0400
cvsdist 4bc0e7f
+++ src/support/nfs/cacheio.c	2004-03-22 18:12:55.163534208 -0500
cvsdist 4bc0e7f
@@ -223,12 +223,23 @@ int readline(int fd, char **buf, int *le
cvsdist 4bc0e7f
  * This succeeds iff the "nfsd" filesystem is mounted on
cvsdist 4bc0e7f
  * /proc/fs/nfs
cvsdist 4bc0e7f
  */
cvsdist 4bc0e7f
+static char *cachelist[] = {
cvsdist 4bc0e7f
+	{ "auth.unix.ip" }, { "nfsd.export" }, { "nfsd.fh" }, 
cvsdist 4bc0e7f
+	{ NULL, NULL }
cvsdist 4bc0e7f
+};
cvsdist 4bc0e7f
 int
cvsdist 4bc0e7f
 check_new_cache(void)
cvsdist 4bc0e7f
 {
cvsdist 4bc0e7f
 	struct stat stb;
cvsdist 4bc0e7f
-	return	(stat("/proc/fs/nfs/filehandle", &stb) == 0) ||
cvsdist 4bc0e7f
-		(stat("/proc/fs/nfsd/filehandle", &stb) == 0);
cvsdist 4bc0e7f
+	char path[64];
cvsdist 4bc0e7f
+	int i;
cvsdist 4bc0e7f
+
cvsdist 4bc0e7f
+	for (i=0; cachelist[i]; i++ ){
cvsdist 4bc0e7f
+		sprintf(path, "/proc/net/rpc/%s/channel", cachelist[i]);
cvsdist 4bc0e7f
+		if (stat(path, &stb) < 0)
cvsdist 4bc0e7f
+			return 0;
cvsdist 4bc0e7f
+	}
cvsdist 4bc0e7f
+	return 1;
cvsdist 4bc0e7f
 }	
cvsdist 1ae9d4b
cvsdist 1ae9d4b