igmpproxy: add a silent logging option
authorDmitry Tunin <hanipouspilot@gmail.com>
Sat, 28 Jul 2018 14:06:28 +0000 (17:06 +0300)
committerJo-Philipp Wich <jo@mein.io>
Tue, 18 Dec 2018 09:13:37 +0000 (10:13 +0100)
[0-3](none, minimal[default], more, maximum)

It is not 100% backward compatible, because now 0 disables logging

Signed-off-by: Dmitry Tunin <hanipouspilot@gmail.com>
(backported from 7a6b2badfa56cfd833d64f113398198f71fd896e)

package/network/services/igmpproxy/Makefile
package/network/services/igmpproxy/files/igmpproxy.config
package/network/services/igmpproxy/files/igmpproxy.init

index 6ac4172c84066d3f4d7fcfab5c1ff062c1789694..d06402a267d989024dc9f66afcdcacbf25adaeea 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=igmpproxy
 PKG_VERSION:=0.2.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/pali/igmpproxy/releases/download/${PKG_VERSION}/
index 6230f8aa1d6bb9deb04f3028d136b2d4f6c66a05..c85ffa3f52eac0b631ab47e43e75197e8c553a25 100644 (file)
@@ -1,6 +1,6 @@
 config igmpproxy
        option quickleave 1
-#      option verbose [0-2]
+#      option verbose [0-3](none, minimal[default], more, maximum)
 
 config phyint
        option network wan
index 0c30895ad610cc3a4fb570ddb2d42049cc8b9a7c..37fe62ad1b011318d110f5933cb13392b1976156 100644 (file)
@@ -9,10 +9,11 @@ CONFIGFILE=/var/etc/igmpproxy.conf
 igmp_header() {
        local quickleave verbose
        config_get_bool quickleave "$1" quickleave 0
-       config_get verbose "$1" verbose 0
+       config_get verbose "$1" verbose 1
 
-       [ $verbose = "1" ] && logopts="-v"
-       [ $verbose = "2" ] && logopts="-v -v"
+       [ $verbose = "0" ] && logopts="-d"
+       [ $verbose = "2" ] && logopts="-v"
+       [ $verbose = "3" ] && logopts="-v -v"
 
        mkdir -p /var/etc
        rm -f /var/etc/igmpproxy.conf