Blame 0129-fixup-No-such-file-or-directory-errors-when-module-i.patch

Harald Hoyer 53404a
From b37b141ecc9588bc5b29a8474943ec603b1f3ba4 Mon Sep 17 00:00:00 2001
Harald Hoyer 53404a
From: Brendan Germain <brendan.germain@nasdaqomx.com>
Harald Hoyer 53404a
Date: Wed, 25 May 2016 15:40:02 -0400
Harald Hoyer 53404a
Subject: [PATCH] fixup No such file or directory errors when module is not
Harald Hoyer 53404a
 configured
Harald Hoyer 53404a
Harald Hoyer 53404a
---
Harald Hoyer 53404a
 modules.d/98syslog/rsyslogd-start.sh | 8 ++++----
Harald Hoyer 53404a
 1 file changed, 4 insertions(+), 4 deletions(-)
Harald Hoyer 53404a
Harald Hoyer 53404a
diff --git a/modules.d/98syslog/rsyslogd-start.sh b/modules.d/98syslog/rsyslogd-start.sh
Harald Hoyer 53404a
index 25dfb16..08b6fb2 100755
Harald Hoyer 53404a
--- a/modules.d/98syslog/rsyslogd-start.sh
Harald Hoyer 53404a
+++ b/modules.d/98syslog/rsyslogd-start.sh
Harald Hoyer 53404a
@@ -26,11 +26,11 @@ rsyslog_config() {
Harald Hoyer 53404a
     #echo "*.* /tmp/syslog"
Harald Hoyer 53404a
 }
Harald Hoyer 53404a
 
Harald Hoyer 53404a
-read type < /tmp/syslog.type
Harald Hoyer 53404a
-read server < /tmp/syslog.server
Harald Hoyer 53404a
-read filters < /tmp/syslog.filters
Harald Hoyer 53404a
+[ -f /tmp/syslog.type ] && read type < /tmp/syslog.type
Harald Hoyer 53404a
+[ -f /tmp/syslog.server ] && read server < /tmp/syslog.server
Harald Hoyer 53404a
+[ -f /tmp/syslog.filters ] && read filters < /tmp/syslog.filters
Harald Hoyer 53404a
 [ -z "$filters" ] && filters="kern.*"
Harald Hoyer 53404a
-read conf < /tmp/syslog.conf
Harald Hoyer 53404a
+[ -f /tmp/syslog.conf ] && read conf < /tmp/syslog.conf
Harald Hoyer 53404a
 [ -z "$conf" ] && conf="/etc/rsyslog.conf" && echo "$conf" > /tmp/syslog.conf
Harald Hoyer 53404a
 
Harald Hoyer 53404a
 if [ $type == "rsyslogd" ]; then