Skip to contentSkip to conversation

nfs-utils: Add missing nfs.conf entries for various cmdline options

PATCH In review Justin Mitchell 2 participants 2 messages Sep 19, 2018 – Sep 27, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfs-utils: Add missing nfs.conf entries for various cmdline options

Add nfs.conf entries for various cmdline options

These options did not have a corresponding nfs.conf entry which is currently forcing use of cmdline flags

---
 utils/gssd/gssd.c       | 3 +++
 utils/gssd/svcgssd.c    | 4 ++++
 utils/idmapd/idmapd.c   | 8 ++++++++
 utils/statd/sm-notify.c | 1 +
 4 files changed, 16 insertions(+)
utils/gssd/gssd.c +3 -0
index 2c14e5f..00df2fc 100644
@@ -888,6 +888,9 @@ main(int argc, char *argv[])
 
 	read_gss_conf();
 
+	verbosity = conf_get_num("gssd", "Verbosity", verbosity);
+	rpc_verbosity = conf_get_num("gssd", "RPC-Verbosity", rpc_verbosity);
+
 	while ((opt = getopt(argc, argv, "DfvrlmnMp:k:d:t:T:R:")) != -1) {
 		switch (opt) {
 			case 'f':
utils/gssd/svcgssd.c +4 -0
index 8e918cc..ec49b61 100644
@@ -113,6 +113,10 @@ main(int argc, char *argv[])
 	else
 		principal = s;
 
+	verbosity = conf_get_num("svcgssd", "Verbosity", verbosity);
+	rpc_verbosity = conf_get_num("svcgssd", "RPC-Verbosity", rpc_verbosity);
+	idmap_verbosity = conf_get_num("svcgssd", "IDMAP-Verbosity", idmap_verbosity);
+
 	while ((opt = getopt(argc, argv, "fivrnp:")) != -1) {
 		switch (opt) {
 			case 'f':
utils/idmapd/idmapd.c +8 -0
index 4811e0f..d14eef7 100644
@@ -261,6 +261,10 @@ main(int argc, char **argv)
 				strlcpy(pipefsdir, xpipefsdir, sizeof(pipefsdir));
 			CONF_SAVE(nobodyuser, conf_get_str("Mapping", "Nobody-User"));
 			CONF_SAVE(nobodygroup, conf_get_str("Mapping", "Nobody-Group"));
+			if (conf_get_bool("General", "server-only", false))
+				clientstart = 0;
+			if (conf_get_bool("General", "client-only", false))
+				serverstart = 0;
 		}
 	} else {
 		conf_path = NFS_CONFFILE;
@@ -276,6 +280,10 @@ main(int argc, char **argv)
 				"cache-expiration", DEFAULT_IDMAP_CACHE_EXPIRY);
 		CONF_SAVE(nobodyuser, conf_get_str("Mapping", "Nobody-User"));
 		CONF_SAVE(nobodygroup, conf_get_str("Mapping", "Nobody-Group"));
+		if (conf_get_bool("General", "server-only", false))
+			clientstart = 0;
+		if (conf_get_bool("General", "client-only", false))
+			serverstart = 0;
 	}
 
 	while ((opt = getopt(argc, argv, GETOPTSTR)) != -1)
utils/statd/sm-notify.c +1 -0
index 7a48473..29dad38 100644
@@ -503,6 +503,7 @@ main(int argc, char **argv)
 	s = conf_get_str("statd", "state-directory-path");
 	if (s && !nsm_setup_pathnames(argv[0], s))
 		exit(1);
+	opt_update_state = conf_get_bool("sm-notify", "update-state", opt_update_state);
 
 	while ((c = getopt(argc, argv, "dm:np:v:P:f")) != -1) {
 		switch (c) {
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 7 lines · Justin Mitchell

Add nfs.conf entries for various cmdline options

These options did not have a corresponding nfs.conf entry which is currently forcing use of cmdline flags

Committed...

steved.

Quoted 75 lines
---
 utils/gssd/gssd.c       | 3 +++
 utils/gssd/svcgssd.c    | 4 ++++
 utils/idmapd/idmapd.c   | 8 ++++++++
 utils/statd/sm-notify.c | 1 +
 4 files changed, 16 insertions(+)
utils/gssd/gssd.c +3 -0
index 2c14e5f..00df2fc 100644
@@ -888,6 +888,9 @@ main(int argc, char *argv[])
 
 	read_gss_conf();
 
+	verbosity = conf_get_num("gssd", "Verbosity", verbosity);
+	rpc_verbosity = conf_get_num("gssd", "RPC-Verbosity", rpc_verbosity);
+
 	while ((opt = getopt(argc, argv, "DfvrlmnMp:k:d:t:T:R:")) != -1) {
 		switch (opt) {
 			case 'f':
utils/gssd/svcgssd.c +4 -0
index 8e918cc..ec49b61 100644
@@ -113,6 +113,10 @@ main(int argc, char *argv[])
 	else
 		principal = s;
 
+	verbosity = conf_get_num("svcgssd", "Verbosity", verbosity);
+	rpc_verbosity = conf_get_num("svcgssd", "RPC-Verbosity", rpc_verbosity);
+	idmap_verbosity = conf_get_num("svcgssd", "IDMAP-Verbosity", idmap_verbosity);
+
 	while ((opt = getopt(argc, argv, "fivrnp:")) != -1) {
 		switch (opt) {
 			case 'f':
utils/idmapd/idmapd.c +8 -0
index 4811e0f..d14eef7 100644
@@ -261,6 +261,10 @@ main(int argc, char **argv)
 				strlcpy(pipefsdir, xpipefsdir, sizeof(pipefsdir));
 			CONF_SAVE(nobodyuser, conf_get_str("Mapping", "Nobody-User"));
 			CONF_SAVE(nobodygroup, conf_get_str("Mapping", "Nobody-Group"));
+			if (conf_get_bool("General", "server-only", false))
+				clientstart = 0;
+			if (conf_get_bool("General", "client-only", false))
+				serverstart = 0;
 		}
 	} else {
 		conf_path = NFS_CONFFILE;
@@ -276,6 +280,10 @@ main(int argc, char **argv)
 				"cache-expiration", DEFAULT_IDMAP_CACHE_EXPIRY);
 		CONF_SAVE(nobodyuser, conf_get_str("Mapping", "Nobody-User"));
 		CONF_SAVE(nobodygroup, conf_get_str("Mapping", "Nobody-Group"));
+		if (conf_get_bool("General", "server-only", false))
+			clientstart = 0;
+		if (conf_get_bool("General", "client-only", false))
+			serverstart = 0;
 	}
 
 	while ((opt = getopt(argc, argv, GETOPTSTR)) != -1)
utils/statd/sm-notify.c +1 -0
index 7a48473..29dad38 100644
@@ -503,6 +503,7 @@ main(int argc, char **argv)
 	s = conf_get_str("statd", "state-directory-path");
 	if (s && !nsm_setup_pathnames(argv[0], s))
 		exit(1);
+	opt_update_state = conf_get_bool("sm-notify", "update-state", opt_update_state);
 
 	while ((c = getopt(argc, argv, "dm:np:v:P:f")) != -1) {
 		switch (c) {