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 --entry [--arg subsection] section tag
12
13       nfsconf  --get [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsec‐
14       tion] section tag
15
16       nfsconf --isset [-v|--verbose] [-f|--file infile.conf]  [-a|--arg  sub‐
17       section] section tag
18
19       nfsconf   --set   [-v|--verbose]   [-m|--modified   Modified  by  text]
20       [-f|--file infile.conf] [-a|--arg subsection] section tag value
21
22       nfsconf --unset [-v|--verbose] [-f|--file infile.conf]  [-a|--arg  sub‐
23       section] section tag
24

DESCRIPTION

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

OPTIONS

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

EXIT STATUS

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

EXAMPLES

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

FILES

103       /etc/nfs.conf
104

SEE ALSO

106       nfsd(8), exportfs(8), idmapd(8), statd(8)
107

AUTHOR

109       Justin Mitchell <jumitche@redhat.com>
110
111
112
113                                  2 May 2018                        nfsconf(8)
Impressum