[PATCH 08/10] exportfs: allow debugging to be enabled in nfs.conf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: NeilBrown <neilb@xxxxxxxx>
---
 systemd/nfs.conf.man        |    6 ++++++
 utils/exportfs/exportfs.c   |    5 +++++
 utils/exportfs/exportfs.man |    8 ++++++++
 3 files changed, 19 insertions(+)

diff --git a/systemd/nfs.conf.man b/systemd/nfs.conf.man
index 2de3919a0a80..9e427a61d621 100644
--- a/systemd/nfs.conf.man
+++ b/systemd/nfs.conf.man
@@ -189,6 +189,12 @@ See
 .BR sm-notify (8)
 for details.
 
+.TP
+.B exportfs
+Only
+.B debug=
+is recognized.
+
 .SH FILES
 .I /etc/nfs.conf
 .SH SEE ALSO
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index b7a910efe353..740b79cd8f42 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -36,6 +36,7 @@
 #include "nfslib.h"
 #include "exportfs.h"
 #include "xlog.h"
+#include "conffile.h"
 
 static void	export_all(int verbose);
 static void	exportfs(char *arg, char *options, int verbose);
@@ -49,6 +50,7 @@ static void release_lockfile(void);
 
 static const char *lockfile = EXP_LOCKFILE;
 static int _lockfd = -1;
+char *conf_path = NFS_CONFFILE;
 
 /*
  * If we aren't careful, changes made by exportfs can be lost
@@ -103,6 +105,9 @@ main(int argc, char **argv)
 	xlog_stderr(1);
 	xlog_syslog(0);
 
+	conf_init();
+	xlog_from_conffile("exportfs");
+
 	while ((c = getopt(argc, argv, "ad:fhio:ruvs")) != EOF) {
 		switch(c) {
 		case 'a':
diff --git a/utils/exportfs/exportfs.man b/utils/exportfs/exportfs.man
index fdf9260c6c75..45b6d834ac4a 100644
--- a/utils/exportfs/exportfs.man
+++ b/utils/exportfs/exportfs.man
@@ -90,6 +90,13 @@ to be added to the kernel's export table.
 .TP
 .B \-d kind " or " \-\-debug kind
 Turn on debugging. Valid kinds are: all, auth, call, general and parse.
+Debugging can also be turned on by setting
+.B debug=
+in the
+.B [exportfs]
+section of
+.IR /etc/nfs.conf .
+
 .TP
 .B -a
 Export or unexport all directories.
@@ -295,6 +302,7 @@ master table of exports
 table of clients accessing server's exports
 .SH SEE ALSO
 .BR exports (5),
+.BR nfs.conf (5),
 .BR rpc.mountd (8),
 .BR netgroup (5)
 .SH AUTHORS


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux