]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(syslog): quote conf variable
authorBenjamin Drung <benjamin.drung@canonical.com>
Fri, 14 Jun 2024 21:41:36 +0000 (23:41 +0200)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Sat, 15 Jun 2024 02:02:23 +0000 (22:02 -0400)
shellcheck complains about SC2086 (info): Double quote to prevent
globbing and word splitting.

The variable `conf` refers to a path and therefore is safe to be quoted.

Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
modules.d/98syslog/rsyslogd-start.sh

index d404e51b3d2c4be3e4a7c84a09c88d27f970ccef..19a7229a9c3110fe8c50c9a1cf272f65e231c9de 100755 (executable)
@@ -41,7 +41,7 @@ rsyslog_config() {
 if [ "$type" = "rsyslogd" ]; then
     template=/etc/templates/rsyslog.conf
     if [ -n "$server" ]; then
-        rsyslog_config "$server" "$template" "$filters" > $conf
+        rsyslog_config "$server" "$template" "$filters" > "$conf"
         rsyslogd -c3
     fi
 fi