Blame 0130-subshell-and-set-f-to-prevent-expansion.patch
|
Harald Hoyer |
53404a |
From 1d9d43713db58f6aafab6c0692fc2ebb9a26b4c7 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 16:11:11 -0400
|
|
Harald Hoyer |
53404a |
Subject: [PATCH] subshell and set -f to prevent expansion
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
---
|
|
Harald Hoyer |
53404a |
modules.d/98syslog/rsyslogd-start.sh | 11 ++++++++---
|
|
Harald Hoyer |
53404a |
1 file changed, 8 insertions(+), 3 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 08b6fb2..c64f212 100755
|
|
Harald Hoyer |
53404a |
--- a/modules.d/98syslog/rsyslogd-start.sh
|
|
Harald Hoyer |
53404a |
+++ b/modules.d/98syslog/rsyslogd-start.sh
|
|
Harald Hoyer |
53404a |
@@ -20,9 +20,14 @@ rsyslog_config() {
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
cat $syslog_template
|
|
Harald Hoyer |
53404a |
|
|
Harald Hoyer |
53404a |
- for filter in $filters; do
|
|
Harald Hoyer |
53404a |
- echo "${filter} @${server}"
|
|
Harald Hoyer |
53404a |
- done
|
|
Harald Hoyer |
53404a |
+ (
|
|
Harald Hoyer |
53404a |
+ # disable shell expansion / globbing
|
|
Harald Hoyer |
53404a |
+ # since filters contain such characters
|
|
Harald Hoyer |
53404a |
+ set -f
|
|
Harald Hoyer |
53404a |
+ for filter in $filters; do
|
|
Harald Hoyer |
53404a |
+ echo "${filter} @${server}"
|
|
Harald Hoyer |
53404a |
+ done
|
|
Harald Hoyer |
53404a |
+ )
|
|
Harald Hoyer |
53404a |
#echo "*.* /tmp/syslog"
|
|
Harald Hoyer |
53404a |
}
|
|
Harald Hoyer |
53404a |
|