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