nfsconf(8)

πŸ’– nfsconf(8) β€” System Manager's Manual πŸ’–

okay bestie, gather round, because this one is actually a little gem. we're talking about nfsconf, the little tool that goes and queries all your various NFS configuration settings for you. it lives in the System Manager's Manual section (section 8, iykyk), and it's about to become your new fave. πŸŽ€


✨ NAME ✨

nfsconf β€” Query various NFS configuration settings

like, it asks the config files questions. and they answer. slay.


πŸ¦‹ SYNOPSIS πŸ¦‹

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

nfsconf --entry [--arg subsection] section tag

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] [-m|--modified Modified by text] [-f|--file
infile.conf] [-a|--arg subsection] section tag value

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

no cap, that's the whole vibe right there. pick a mode, hand it a section and a tag, and off you go. πŸ’…


🌸 DESCRIPTION 🌸

the nfsconf command is your bestie for testing for and retrieving configuration settings from a whole range of nfs-utils configuration files. it's giving "personal assistant for your conf files." 🫢

Modes

here's the menu of modes, and honestly? iconic lineup:

  • -d, --dump β€” outputs an alphabetically sorted dump of the current configuration in conf file format. it also accepts an optional filename to write the output into. cute AND organized.
  • -e, --entry β€” retrieves the config entry itself rather than its current expanded value. so you get the raw thing, not the glow-up. πŸ™ˆ
  • -i, --isset β€” tests whether a specific tag actually has a value set. yes/no energy.
  • -g, --get β€” outputs the current value of the specified tag. gimme the tea β˜•
  • -s, --set β€” updates or adds a tag and value to the config file in a specified section, and it will create the tag, the section, and the file if necessary. main character energy fr. if the section is defined as '#' then a comment gets appended to the file. and if a comment is set with a tag name, then any existing tagged comment with a matching name gets replaced.
  • -u, --unset β€” removes the specified tag and its value from the config file. bye bye πŸ‘‹

πŸ’… OPTIONS πŸ’…

Options valid in all modes

these ones work everywhere, no matter which mode you picked. universal queens πŸ‘‘

  • -v, --verbose β€” increases verbosity and prints debugging information. turn it up when you need the deets.
  • -f, --file infile β€” selects a different config file to operate upon. the default is /etc/nfs.conf.

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

these three modes get a lil something extra:

  • -a, --arg subsection β€” selects a specific sub-section. so specific. so precise. ✨

Options only valid in --set mode.

and --set gets its own special treat:

  • -m, --modified "Modified by nfsconf" β€” sets the text on the Modified date comment in the file. set it to empty to remove it entirely. πŸŽ€

🌈 EXIT STATUS 🌈

--isset mode

in this mode, the command returns success (0) if the selected tag has a value. any other exit code means the value is not set, or that some other error has occurred. it's a vibe check and the vibe is binary. πŸ’€

all other modes

success is indicated by an exit status of zero. any other status means an error. error messages get output on stderr, and cranking up the verbosity will give you more detailed explanations, if any are available. so if something's weird, add -v and let it spill. πŸ“


πŸ”₯ EXAMPLES πŸ”₯

okay this is the fun part, let's see her in action:

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.

literally a syntax-error detector and a sorter in one move. obsessed.

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.

shell script girlies, this one's for you 🫢

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

so specific. we love a targeted query. πŸ’–

nfsconf --file /etc/nfs.conf --set nfsd debug 1
Enable debugging in nfsd

one line. debugging on. periodt. πŸ‘‘


🧚 FILES 🧚

  • /etc/nfs.conf

(the default file, the home base, the main character file 🏠)


⭐ SEE ALSO ⭐

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

go read those too bestie, they're all in the same friend group. 🌸


πŸ’œ AUTHOR πŸ’œ

Justin Mitchell <jumitche@redhat.com>


that's the whole page, no notes, no cap. go forth and configure. πŸ’…βœ¨

okay byeee, this was the nfsconf(8) page from 2 May 2018, part of the System Manager's Manual (version nfsconf(8), obviously πŸ’–). mwah, love u, go read your config files πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from