1nfsconf(8)                  System Manager's Manual                 nfsconf(8)
2
3
4

NAME

6       nfsconf - Query various NFS configuration settings
7

SYNOPSIS

9       nfsconf --dump [-v|--verbose] [-f|--file infile.conf] [outfile]
10
11       nfsconf  --get [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsec‐
12       tion] section tag
13
14       nfsconf --isset [-v|--verbose] [-f|--file infile.conf]  [-a|--arg  sub‐
15       section] section tag
16
17       nfsconf   --set   [-v|--verbose]   [-m|--modified   Modified  by  text]
18       [-f|--file infile.conf] [-a|--arg subsection] section tag value
19
20       nfsconf --unset [-v|--verbose] [-f|--file infile.conf]  [-a|--arg  sub‐
21       section] section tag
22

DESCRIPTION

24       The  nfsconf command can be used to test for and retrieve configuration
25       settings from a range of nfs-utils configuration files.
26
27   Modes
28       The following modes are available:
29
30       -d, --dump
31              Output an alphabetically sorted dump of the  current  configura‐
32              tion  in conf file format. Accepts an optional filename in which
33              to write the output.
34
35       -i, --isset
36              Test if a specific tag has a value set.
37
38       -g, --get
39              Output the current value of the specified tag.
40
41       -s, --set
42              Update or Add a tag and value to the config file in a  specified
43              section,  creating  the  tag, section, and file if necessary. If
44              the section is defined as '#' then a comment is appended to  the
45              file.  If  a  comment  is  set  with a tag name then any exiting
46              tagged comment with a matching name is replaced.
47
48       -u, --unset
49              Remove the specified tag and its value from the config file.
50

OPTIONS

52   Options valid in all modes
53       -v, --verbose
54              Increase verbosity and print debugging information.
55
56       -f, --file infile
57              Select a different config  file  to  operate  upon,  default  is
58              /etc/nfs.conf
59
60   Options only valid in --get and --isset modes.
61       -a, --arg subsection
62              Select a specific sub-section
63
64   Options only valid in --set mode.
65       -m,  --modified "Modified by nfsconf" Set the text on the Modified date
66       comment in the file. Set to empty to remove.
67

EXIT STATUS

69   --isset mode
70       In this mode the command will return success (0) if  the  selected  tag
71       has  a  value,  any  other exit code indicates the value is not set, or
72       some other error has occurred.
73
74   all other modes
75       Success is indicated by an exit status of zero, any other status  indi‐
76       cates  an  error.  Error  messages are output on stderr, and increasing
77       verbosity will give more detailed explanations if any are available.
78

EXAMPLES

80       nfsconf -v --dump --file /tmp/testconf.conf sorted.conf
81              Check a new config file for syntax errors and  output  a  sorted
82              version for ease of comparison with existing settings.
83
84       if  !  nfsconf  --isset  gssd preferred-realm ; then echo 'No preferred
85       realm configured for gss'; fi
86              The tool allows for easy testing of  configuration  values  from
87              shell scripts, here we test if a specific value has been set.
88
89       nfsconf  --file  /etc/nfsmount.conf  --get --arg /home MountPoint back‐
90       ground
91              Show default value for background option for NFS mounts  of  the
92              /home path.
93
94       nfsconf --file /etc/nfs.conf --set nfsd debug 1
95              Enable debugging in nfsd
96

FILES

98       /etc/nfs.conf
99

SEE ALSO

101       nfsd(8), exportfs(8), idmapd(8), statd(8)
102

AUTHOR

104       Justin Mitchell <jumitche@redhat.com>
105
106
107
108                                  2 May 2018                        nfsconf(8)
Impressum