Scroll to navigation

nfsconf(8) System Manager's Manual nfsconf(8)

NAME

nfsconf - Query various NFS configuration settings

SYNOPSIS

nfsconf --dump [-v|--verbose] [-f|--file infile.conf] [outfile]

nfsconf --get [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsection] section tag

nfsconf --isset [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsection] section tag

nfsconf --set [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsection] section tag value

nfsconf --unset [-v|--verbose] [-f|--file infile.conf] [-a|--arg subsection] section tag

DESCRIPTION

The nfsconf command can be used to test for and retrieve configuration settings from a range of nfs-utils configuration files.

Modes

The following modes are available:

Output an alphabetically sorted dump of the current configuration in conf file format. Accepts an optional filename in which to write the output.
Test if a specific tag has a value set.
Output the current value of the specified tag.
Update or Add a tag and value to the config file, creating the file if necessary.
Remove the specified tag and its value from the config file.

OPTIONS

Options valid in all modes

Increase verbosity and print debugging information.
Select a different config file to operate upon, default is /etc/nfs.conf

Options only valid in --get and --isset modes.

Select a specific sub-section

EXIT STATUS

--isset 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.

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.

EXAMPLES

Check a new config file for syntax errors and output a sorted version for ease of comparison with existing settings.
The tool allows for easy testing of configuration values from shell scripts, here we test if a specific value has been set.
Show default value for background option for NFS mounts of the /home path.
Enable debugging in nfsd

FILES

/etc/nfs.conf

SEE ALSO

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

AUTHOR

Justin Mitchell <jumitche@redhat.com>

2 May 2018