aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>2016-07-20 23:30:58 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-07-20 23:30:58 +0200
commit9f29d3e5af63233e8bccc3f8990bbb818af290d0 (patch)
tree1fa15c95cb48e85ef9a968d94388937962d9ae09 /package/network
parent1fd7e5d65ef7714784587fda0e3f413f970bb940 (diff)
downloadmaster-187ad058-9f29d3e5af63233e8bccc3f8990bbb818af290d0.tar.gz
master-187ad058-9f29d3e5af63233e8bccc3f8990bbb818af290d0.tar.bz2
master-187ad058-9f29d3e5af63233e8bccc3f8990bbb818af290d0.zip
igmpproxy: logging options - make work & improve
Move logging command line option to uci: option verbose [0]/1/2 - mono-syllabic/verbose/noisy Previously handled as 'OPTIONS' in .init script however variable was ignored so never worked. Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/igmpproxy/Makefile2
-rw-r--r--package/network/services/igmpproxy/files/igmpproxy.config1
-rw-r--r--package/network/services/igmpproxy/files/igmpproxy.init24
3 files changed, 9 insertions, 18 deletions
diff --git a/package/network/services/igmpproxy/Makefile b/package/network/services/igmpproxy/Makefile
index 0ad85561c1..8d4da5ca9e 100644
--- a/package/network/services/igmpproxy/Makefile
+++ b/package/network/services/igmpproxy/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=igmpproxy
PKG_VERSION:=0.1
-PKG_RELEASE:=8
+PKG_RELEASE:=9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/igmpproxy
diff --git a/package/network/services/igmpproxy/files/igmpproxy.config b/package/network/services/igmpproxy/files/igmpproxy.config
index d2906329d6..d89013ca98 100644
--- a/package/network/services/igmpproxy/files/igmpproxy.config
+++ b/package/network/services/igmpproxy/files/igmpproxy.config
@@ -1,5 +1,6 @@
config igmpproxy
option quickleave 1
+# option verbose [0-2]
config phyint wan
option network wan
diff --git a/package/network/services/igmpproxy/files/igmpproxy.init b/package/network/services/igmpproxy/files/igmpproxy.init
index d03f90f0c8..9e337221f1 100644
--- a/package/network/services/igmpproxy/files/igmpproxy.init
+++ b/package/network/services/igmpproxy/files/igmpproxy.init
@@ -6,24 +6,13 @@ USE_PROCD=1
PROG=/usr/sbin/igmpproxy
CONFIGFILE=/var/etc/igmpproxy.conf
-# igmpproxy supports both a debug mode and verbosity, which are very useful
-# when something isn't working.
-#
-# Debug mode will print everything to stdout instead of syslog. Generally
-# verbosity should NOT be set as it will quickly fill your syslog.
-#
-# Put any debug or verbosity options into IGMP_OPTS
-#
-# Examples:
-# OPTIONS="-d -v -v" - debug mode and very verbose, this will land in
-# stdout and not in syslog
-# OPTIONS="-v" - be verbose, this will write aditional information to syslog
-
-OPTIONS=""
-
igmp_header() {
- local quickleave
+ local quickleave verbose
config_get_bool quickleave "$1" quickleave 0
+ config_get verbose "$1" verbose 0
+
+ [ $verbose = "1" ] && logopts="-v"
+ [ $verbose = "2" ] && logopts="-v -v"
mkdir -p /var/etc
rm -f /var/etc/igmpproxy.conf
@@ -113,6 +102,7 @@ service_triggers() {
start_service() {
has_upstream=
netdevs=
+ logopts=
config_load igmpproxy
config_foreach igmp_header igmpproxy
@@ -121,7 +111,7 @@ start_service() {
procd_open_instance
procd_set_param command $PROG
- [ -n "$OPTIONS" ] && procd_append_param $OPTIONS
+ [ -n "$logopts" ] && procd_append_param command $logopts
procd_append_param command $CONFIGFILE
procd_set_param file $CONFIGFILE
procd_set_param netdev $netdevs