From: Giacomo Sanchietti Date: Mon, 20 Jun 2022 16:07:37 +0000 (+0200) Subject: rsyslog: improve default config X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=7afd539dbf720229fce8f783269e4e5a735cbb5d;p=openwrt-packages.git rsyslog: improve default config Check also for config files containing comment lines starting with white spaces. Signed-off-by: Giacomo Sanchietti --- diff --git a/admin/rsyslog/files/20_rsyslog b/admin/rsyslog/files/20_rsyslog index 6fd008a06..50fdbaab7 100644 --- 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