# 78 -> upload root qdisc
# 79 -> fwmark
- tc qdisc del dev "$iface" root handle 77:
+ silent tc qdisc del dev "$iface" root handle 77:
if [ "$LIMIT_UP" -gt 0 -a "$LIMIT_DOWN" -gt 0 ]; then
tc qdisc add dev "$iface" root handle 77: htb
qos_iface_del() {
local iface="$1"
- tc qdisc del dev "$iface" root handle 77:
- tc qdisc del dev "$iface" root handle 78:
- tc filter del dev "$iface" parent ffff: protocol ip prio 1 handle 79 fw
+ silent tc qdisc del dev "$iface" root handle 77:
+ silent tc qdisc del dev "$iface" root handle 78:
+ silent tc filter del dev "$iface" parent ffff: protocol ip prio 1 handle 79 fw
}
boot() {
LIMIT_DOWN_BURST="${LIMIT_DOWN_BURST:-$(($LIMIT_DOWN * 2))}"
### Load required modules
- [ "$LIMIT_IP" -gt 0 -a "$LIMIT_DOWN" -gt 0 ] && {
+ [ "$LIMIT_UP" -gt 0 -a "$LIMIT_DOWN" -gt 0 ] && {
silent insmod cls_fw
- silent insmod cls_route
- silent insmod cls_rsvp
- silent insmod cls_rsvp6
- silent insmod cls_tcindex
silent insmod cls_u32
- silent insmod sch_cbq
- silent insmod sch_csz
- silent insmod sch_dsmark
- silent insmod sch_gred
- silent insmod sch_hfsc
silent insmod sch_htb
silent insmod sch_ingress
- silent insmod sch_red
- silent insmod sch_tbf
- silent insmod sch_teql
}
### Create subchains
grep -q luci-splash /etc/crontabs/root || {
echo '*/5 * * * * /usr/sbin/luci-splash sync' >> /etc/crontabs/root
}
-
- ### Start the splash httpd
- start-stop-daemon -S -m -p /var/run/luci-splashd.pid -b -q -x /usr/bin/luci-splashd
}
stop() {
silent iptables -t nat -X luci_splash_prerouting
silent iptables -t filter -X luci_splash_counter
silent iptables -t mangle -X luci_splash_mark
-
- ### Stop the splash httpd
- start-stop-daemon -K -p /var/run/luci-splashd.pid -s KILL -q
sed -ie '/\/usr\/sbin\/luci-splash sync/d' /var/spool/cron/crontabs/root
}