Ian Kent ff0a25
autofs-5.1.4 - tiny patch for autofs typo and possible bug
Ian Kent ff0a25
Ian Kent ff0a25
From: Todd Eigenschink <todd@fai2.com>
Ian Kent ff0a25
Ian Kent ff0a25
(1) The word "to" is doubled in two warnings.
Ian Kent ff0a25
Ian Kent ff0a25
(2) It prints a warning when it can't open the "old" config file, even
Ian Kent ff0a25
if it was able to open the default one. That's a reasonable warning if
Ian Kent ff0a25
it *couldn't* open the new one, but seems unnecessary if it could.
Ian Kent ff0a25
Ian Kent ff0a25
The patch removes the unneeded "to"s and only prints warning about the
Ian Kent ff0a25
old config file if it couldn't open the default one.
Ian Kent ff0a25
Ian Kent ff0a25
Signed-off-by: Todd Eigenschink <todd@fai2.com>
Ian Kent ff0a25
Signed-off-by: Ian Kent <raven@themaw.net>
Ian Kent ff0a25
---
Ian Kent ff0a25
 CHANGELOG      |    1 +
Ian Kent ff0a25
 lib/defaults.c |    6 +++---
Ian Kent ff0a25
 2 files changed, 4 insertions(+), 3 deletions(-)
Ian Kent ff0a25
Ian Kent ff0a25
--- autofs-5.1.4.orig/CHANGELOG
Ian Kent ff0a25
+++ autofs-5.1.4/CHANGELOG
Ian Kent ff0a25
@@ -67,6 +67,7 @@
Ian Kent ff0a25
 - fix prefix option handling in expand_entry().
Ian Kent ff0a25
 - fix sublink option not set from defaults.
Ian Kent ff0a25
 - fix error return in do_nfs_mount().
Ian Kent ff0a25
+- tiny patch for autofs typo and possible bug.
Ian Kent ff0a25
 
Ian Kent ff0a25
 24/05/2017 autofs-5.1.3
Ian Kent ff0a25
 =======================
Ian Kent ff0a25
--- autofs-5.1.4.orig/lib/defaults.c
Ian Kent ff0a25
+++ autofs-5.1.4/lib/defaults.c
Ian Kent ff0a25
@@ -1207,12 +1207,12 @@ unsigned int defaults_read_config(unsign
Ian Kent ff0a25
 
Ian Kent ff0a25
 	conf = open_fopen_r(DEFAULT_CONFIG_FILE);
Ian Kent ff0a25
 	if (!conf)
Ian Kent ff0a25
-		message(to_syslog, "failed to to open config %s",
Ian Kent ff0a25
+		message(to_syslog, "failed to open config %s",
Ian Kent ff0a25
 			DEFAULT_CONFIG_FILE);
Ian Kent ff0a25
 
Ian Kent ff0a25
 	oldconf = open_fopen_r(OLD_CONFIG_FILE);
Ian Kent ff0a25
-	if (!oldconf)
Ian Kent ff0a25
-		message(to_syslog, "failed to to open old config %s",
Ian Kent ff0a25
+	if (!oldconf && !conf)
Ian Kent ff0a25
+		message(to_syslog, "failed to open old config %s",
Ian Kent ff0a25
 			OLD_CONFIG_FILE);
Ian Kent ff0a25
 
Ian Kent ff0a25
 	/* Neither config has been updated */