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