From patchwork Thu Dec 8 04:27:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 9465789 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CA53960231 for ; Thu, 8 Dec 2016 04:44:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFB1F28507 for ; Thu, 8 Dec 2016 04:44:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B485328515; Thu, 8 Dec 2016 04:44:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 360B528507 for ; Thu, 8 Dec 2016 04:44:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932575AbcLHEoB (ORCPT ); Wed, 7 Dec 2016 23:44:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:45635 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbcLHEoA (ORCPT ); Wed, 7 Dec 2016 23:44:00 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3F185AB22; Thu, 8 Dec 2016 04:28:33 +0000 (UTC) From: NeilBrown To: "J. Bruce Fields" , Steve Dickson Date: Thu, 08 Dec 2016 15:27:25 +1100 Subject: [PATCH 08/10] exportfs: allow debugging to be enabled in nfs.conf Cc: linux-nfs@vger.kernel.org Message-ID: <148117124572.31271.14400211473865023109.stgit@noble> In-Reply-To: <148117122602.31271.13586847542442809540.stgit@noble> References: <148117122602.31271.13586847542442809540.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: NeilBrown --- systemd/nfs.conf.man | 6 ++++++ utils/exportfs/exportfs.c | 5 +++++ utils/exportfs/exportfs.man | 8 ++++++++ 3 files changed, 19 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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