This avoids failing to start in current OpenWrt Attitude Adjustment and trunk,
which lack IMQ support (and WONTFIX). Suggested in the issue discussed in:
http://ml.ninux.org/pipermail/nodogsplash/2013-May/000009.html
Signed-off-by: Gui Iribarren <gui@altermundi.net>
PKG_NAME:=nodogsplash
PKG_FIXUP:=autoreconf
PKG_VERSION:=0.9_beta9.9.8
PKG_NAME:=nodogsplash
PKG_FIXUP:=autoreconf
PKG_VERSION:=0.9_beta9.9.8
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
IPT=/usr/sbin/iptables
WD_DIR=/usr/bin
IPT=/usr/sbin/iptables
WD_DIR=/usr/bin
+NDS_CONF=/etc/nodogsplash/nodogsplash.conf
OPTIONS=""
START=65
STOP=65
OPTIONS=""
START=65
STOP=65
do_module_tests "ipt_mac"
do_module_tests "ipt_mark"
do_module_tests "ipt_mac"
do_module_tests "ipt_mark"
- # if not using traffic control,
- # you can comment out the following 3 lines:
- do_module_tests "imq" "numdevs=2"
- do_module_tests "ipt_IMQ"
- do_module_tests "sch_htb"
+
+ # test for imq modules, only if TrafficControl is enabled in conf
+ if ( grep -q '^[[:space:]]*TrafficControl[[:space:]]\+yes' "$NDS_CONF" ) ; then
+ do_module_tests "imq" "numdevs=2"
+ do_module_tests "ipt_IMQ"
+ do_module_tests "sch_htb"
+ fi