syslog-ng: tweak shell code of network_localhost little bit
authorKarel Kočí <cynerd@email.cz>
Sun, 13 Sep 2020 09:28:02 +0000 (11:28 +0200)
committerKarel Kočí <cynerd@email.cz>
Sun, 13 Sep 2020 09:29:43 +0000 (11:29 +0200)
We can get rid of pipe with -n flag to sysctl.

Signed-off-by: Karel Kočí <cynerd@email.cz>
admin/syslog-ng/Makefile
admin/syslog-ng/files/scl/network_localhost/detect.sh

index 49022919505e67f1d111106e1c1c39b10c76a8ed..db5352bbd6fbe8f66bab8eab643205007e9d37b2 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syslog-ng
 PKG_VERSION:=3.29.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
index ef76272c473c1e8079420b9cab6f2eefa92d0e9c..acfb40704a976e6f7f012c31dce7ddba392f3a02 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-if [ "$(sysctl net.ipv6.conf.lo.disable_ipv6 | cut -d' ' -f 3)" = "0" ]; then
+if [ "$(sysctl -n net.ipv6.conf.lo.disable_ipv6)" = "0" ]; then
        echo 'network(ip("::1") port(514) transport(udp) ip-protocol(6) )'
 else
        echo 'network(ip("127.0.0.1") port(514) transport(udp) ip-protocol(4) )'