summaryrefslogtreecommitdiff
path: root/systemd
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2019-10-14 14:08:27 -0400
committerSteve Dickson <steved@redhat.com>2019-10-14 14:15:20 -0400
commitc6fdcbe0a5cfacb84e3b071925f4d0b61df830a4 (patch)
treefc56a25182bef698e30cc78b34c42c06009dbbb7 /systemd
parent7fc4d064f9519f13ba6bc778af7cd904ee2dfce7 (diff)
downloadnfs-utils-c6fdcbe0a5cfacb84e3b071925f4d0b61df830a4.tar.gz
conffile: allow optional include files
If nfs.conf contains, for example include = /etc/nfs.conf.local and /etc/nfs.conf.local doesn't exist, then a warning is given. Sometimes it is useful to have an optional include file which is included if present, but for which an absence doesn't give a warning. Systemd has a convention that a hyphen at the start of an include file name marks it as optional, so add this convention to nfs-utils. So include = -/etc/nfs.conf.local will not give a warning if the file doesn't exist. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'systemd')
-rw-r--r--systemd/nfs.conf.man3
1 files changed, 3 insertions, 0 deletions
diff --git a/systemd/nfs.conf.man b/systemd/nfs.conf.man
index d375bcc..3f1c726 100644
--- a/systemd/nfs.conf.man
+++ b/systemd/nfs.conf.man
@@ -65,6 +65,9 @@ section headers, then new sections will be created just as if the
included file appeared in place of the
.B include
line.
+If the file name starts with a hyphen then that is stripped off
+before the file is opened, and if file doesn't exist no warning is
+given. Normally a non-existent include file generates a warning.
.PP
Lookup of section and value names is case-insensitive.