projects
/
feed
/
packages.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3f6591
)
rsyslog: improve default config
author
Giacomo Sanchietti
<giacomo.sanchietti@nethesis.it>
Mon, 20 Jun 2022 16:07:37 +0000
(18:07 +0200)
committer
Rosen Penev
<rosenp@gmail.com>
Thu, 7 Jul 2022 17:34:58 +0000
(10:34 -0700)
Check also for config files containing comment lines starting
with white spaces.
Signed-off-by: Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
admin/rsyslog/files/20_rsyslog
patch
|
blob
|
history
diff --git
a/admin/rsyslog/files/20_rsyslog
b/admin/rsyslog/files/20_rsyslog
index 6fd008a0662bdf35c45b590c361f28ff2b9d8522..50fdbaab735d69f55d58836d6e312cb15107238c 100644
(file)
--- a/
admin/rsyslog/files/20_rsyslog
+++ b/
admin/rsyslog/files/20_rsyslog
@@
-1,4
+1,6
@@
-[ "$(sed -e '/^#/d' -e '/^\s*$/d' /etc/rsyslog.conf)" != "" ] && exit 0
+#!/bin/sh
+
+grep -qv -e '^\s*#' -e '^\s*$' /etc/rsyslog.conf 2>/dev/null && exit 0
[ "$(uci -q get rsyslog.syslog)" == "syslog" ] && exit 0
uci -q import rsyslog << EOI