logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

nfsconf - Query various NFS configuration settings

Author

       Justin Mitchell <jumitche@redhat.com>

                                                   2 May 2018                                         nfsconf(8)

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:

       -d,--dump
              Output an alphabetically sorted dump of the current configuration in conf file format. Accepts  an
              optional filename in which to write the output.

       -e,--entry
              retrieve the config entry rather than its current expanded value

       -i,--isset
              Test if a specific tag has a value set.

       -g,--get
              Output the current value of the specified tag.

       -s,--set
              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.

       -u,--unset
              Remove the specified tag and its value from the config file.

Examples

nfsconf-v--dump--file/tmp/testconf.confsorted.conf
              Check a new config file for syntax errors and output a sorted version for ease of comparison  with
              existing settings.

       if!nfsconf--issetgssdpreferred-realm;thenecho'Nopreferredrealmconfiguredforgss';fi
              The  tool  allows  for  easy testing of configuration values from shell scripts, here we test if a
              specific value has been set.

       nfsconf--file/etc/nfsmount.conf--get--arg/homeMountPointbackground
              Show default value for background option for NFS mounts of the /home path.

       nfsconf--file/etc/nfs.conf--setnfsddebug1
              Enable debugging in nfsd

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.

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

Files

/etc/nfs.conf

Name

       nfsconf - Query various NFS configuration settings

Options

Optionsvalidinallmodes-v,--verbose
              Increase verbosity and print debugging information.

       -f,--fileinfile
              Select a different config file to operate upon, default is /etc/nfs.confOptionsonlyvalidin--entry and --get and --isset modes.
       -a,--argsubsection
              Select a specific sub-section

   Optionsonlyvalidin--set mode.
       -m,--modified"Modifiedbynfsconf" Set the text on the Modified date comment in the file. Set to empty
       to remove.

See Also

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

Synopsis

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

       nfsconf--entry [--argsubsection]sectiontagnfsconf--get [-v|--verbose] [-f|--fileinfile.conf] [-a|--argsubsection] sectiontagnfsconf--isset [-v|--verbose] [-f|--fileinfile.conf] [-a|--argsubsection] sectiontagnfsconf--set  [-v|--verbose]  [-m|--modifiedModifiedbytext]  [-f|--fileinfile.conf]  [-a|--argsubsection] sectiontagvaluenfsconf--unset [-v|--verbose] [-f|--fileinfile.conf] [-a|--argsubsection] sectiontag

See Also