Debian Codegraph @

upstream/debian-unstable/man8/nfsconf.8

raw
1 .\"
2 .\" nfsconf(8)
3 .\"
4 .TH nfsconf 8 "2 May 2018"
5 .SH NAME
6 nfsconf \- Query various NFS configuration settings
7 .SH SYNOPSIS
8 .B nfsconf \-\-dump
9 .RB [ \-v | \-\-verbose ]
10 .RB [ \-f | \-\-file
11 .IR infile.conf ]
12 .RI [ outfile ]
13 .P
14 .B nfsconf \-\-entry
15 .RB [ \-\-arg
16 .IR subsection]
17 .IR section
18 .IR tag
19 .P
20 .B nfsconf \-\-get
21 .RB [ \-v | \-\-verbose ]
22 .RB [ \-f | \-\-file
23 .IR infile.conf ]
24 .RB [ \-a | \-\-arg
25 .IR subsection ]
26 .IR section
27 .IR tag
28 .P
29 .B nfsconf \-\-isset
30 .RB [ \-v | \-\-verbose ]
31 .RB [ \-f | \-\-file
32 .IR infile.conf ]
33 .RB [ \-a | \-\-arg
34 .IR subsection ]
35 .IR section
36 .IR tag
37 .P
38 .B nfsconf \-\-set
39 .RB [ \-v | \-\-verbose ]
40 .RB [ \-m | \-\-modified
41 .IR "Modified by text" ]
42 .RB [ \-f | \-\-file
43 .IR infile.conf ]
44 .RB [ \-a | \-\-arg
45 .IR subsection ]
46 .IR section
47 .IR tag
48 .IR value
49 .P
50 .B nfsconf \-\-unset
51 .RB [ \-v | \-\-verbose ]
52 .RB [ \-f | \-\-file
53 .IR infile.conf ]
54 .RB [ \-a | \-\-arg
55 .IR subsection ]
56 .IR section
57 .IR tag
58 .SH DESCRIPTION
59 The
60 .B nfsconf
61 command can be used to test for and retrieve configuration settings
62 from a range of nfs-utils configuration files.
63 .SS Modes
64 The following modes are available:
65 .IP "\fB\-d, \-\-dump\fP"
66 Output an alphabetically sorted dump of the current configuration in conf file format. Accepts an optional filename in which to write the output.
67 .IP "\fB\-e, \-\-entry\fP"
68 retrieve the config entry rather than its current expanded value
69 .IP "\fB\-i, \-\-isset\fP"
70 Test if a specific tag has a value set.
71 .IP "\fB\-g, \-\-get\fP"
72 Output the current value of the specified tag.
73 .IP "\fB\-s, \-\-set\fP"
74 Update or Add a tag and value to the config file in a specified section, creating the tag, section, and file if necessary. If the section is defined as '#' then a comment is appended to the file. If a comment is set with a tag name then any exiting tagged comment with a matching name is replaced.
75 .IP "\fB\-u, \-\-unset\fP"
76 Remove the specified tag and its value from the config file.
77 .SH OPTIONS
78 .SS Options valid in all modes
79 .TP
80 .B \-v, \-\-verbose
81 Increase verbosity and print debugging information.
82 .TP
83 .B \-f, \-\-file \fIinfile\fR
84 Select a different config file to operate upon, default is
85 .I /etc/nfs.conf
86 .SS Options only valid in \fB\-\-entry\fR and \fB\-\-get\fR and \fB\-\-isset\fR modes.
87 .TP
88 .B \-a, \-\-arg \fIsubsection\fR
89 Select a specific sub-section
90 .SS Options only valid in \fB\-\-set\fR mode.
91 .B \-m, \-\-modified \fI"Modified by nfsconf"\fR
92 Set the text on the Modified date comment in the file. Set to empty to remove.
93 .SH EXIT STATUS
94 .SS \fB\-\-isset\fR mode
95 In this mode the command will return success (0) if the selected tag has a value, any other exit code indicates the value is not set, or some other error has occurred.
96 .SS all other modes
97 Success is indicated by an exit status of zero, any other status indicates an error. Error messages are output on stderr, and increasing verbosity will give more detailed explanations if any are available.
98 .SH EXAMPLES
99 .TP
100 .B nfsconf -v --dump --file /tmp/testconf.conf sorted.conf
101 Check a new config file for syntax errors and output a sorted version for ease of comparison with existing settings.
102 .TP
103 .B if ! nfsconf --isset gssd preferred-realm ; then echo 'No preferred realm configured for gss'; fi
104 The tool allows for easy testing of configuration values from shell scripts, here we test if a specific value has been set.
105 .TP
106 .B nfsconf --file /etc/nfsmount.conf --get --arg /home MountPoint background
107 Show default value for \fIbackground\fR option for NFS mounts of the \fI/home\fR path.
108 .TP
109 .B nfsconf --file /etc/nfs.conf --set nfsd debug 1
110 Enable debugging in nfsd
111 .SH FILES
112 .TP
113 .B /etc/nfs.conf
114 .SH SEE ALSO
115 .BR nfsd (8),
116 .BR exportfs (8),
117 .BR idmapd (8),
118 .BR statd (8)
119 .SH AUTHOR
120 Justin Mitchell <[email protected]>