diff --git a/build_patches/gluon/0001-simple-tc-Use-hotplug.d-iface-instead-of-hotplug.d-n.patch b/build_patches/gluon/0001-simple-tc-Use-hotplug.d-iface-instead-of-hotplug.d-n.patch new file mode 100644 index 0000000..8d40702 --- /dev/null +++ b/build_patches/gluon/0001-simple-tc-Use-hotplug.d-iface-instead-of-hotplug.d-n.patch @@ -0,0 +1,79 @@ +From 4ba8dbb8e8815ae3988d5844a29f4503e5ccacdb Mon Sep 17 00:00:00 2001 +From: Adrian Schmutzler +Date: Sun, 17 Sep 2017 21:03:09 +0200 +Subject: [PATCH] simple-tc: Use hotplug.d/iface instead of hotplug.d/net + +Signed-off-by: Adrian Schmutzler +--- + .../files/etc/hotplug.d/iface/50-fff-simple-tc | 25 +++++++++++++++++++++ + net/simple-tc/files/etc/hotplug.d/net/50-simple-tc | 26 ---------------------- + 2 files changed, 25 insertions(+), 26 deletions(-) + create mode 100644 net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc + delete mode 100644 net/simple-tc/files/etc/hotplug.d/net/50-simple-tc + +diff --git a/net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc b/net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc +new file mode 100644 +index 0000000..ef8bd17 +--- /dev/null ++++ b/net/simple-tc/files/etc/hotplug.d/iface/50-fff-simple-tc +@@ -0,0 +1,25 @@ ++[ "$ACTION" = 'ifup' ] || exit 0 ++ ++config_load simple-tc ++ ++tc_interface() { ++ local iface="$1" ++ ++ config_get ifname "$iface" ifname ++ ++ [ "$INTERFACE" = "$ifname" ] || return ++ ++ config_get_bool enabled "$iface" enabled 0 ++ ++ [ "$enabled" -eq 1 ] || return ++ ++ config_get limit_ingress "$iface" limit_ingress ++ config_get limit_egress "$iface" limit_egress ++ ++ [ "$limit_ingress" ] || limit_ingress=- ++ [ "$limit_egress" ] || limit_egress=- ++ ++ simple-tc "$DEVICE" "$limit_ingress" "$limit_egress" ++} ++ ++config_foreach tc_interface 'interface' +diff --git a/net/simple-tc/files/etc/hotplug.d/net/50-simple-tc b/net/simple-tc/files/etc/hotplug.d/net/50-simple-tc +deleted file mode 100644 +index f089f54..0000000 +--- a/net/simple-tc/files/etc/hotplug.d/net/50-simple-tc ++++ /dev/null +@@ -1,26 +0,0 @@ +-[ "$ACTION" = 'add' ] || exit 0 +- +-config_load simple-tc +- +- +-tc_interface() { +- local iface="$1" +- +- config_get ifname "$iface" ifname +- +- [ "$INTERFACE" = "$ifname" ] || return +- +- config_get_bool enabled "$iface" enabled 0 +- +- [ "$enabled" -eq 1 ] || return +- +- config_get limit_ingress "$iface" limit_ingress +- config_get limit_egress "$iface" limit_egress +- +- [ "$limit_ingress" ] || limit_ingress=- +- [ "$limit_egress" ] || limit_egress=- +- +- simple-tc "$INTERFACE" "$limit_ingress" "$limit_egress" +-} +- +-config_foreach tc_interface 'interface' +-- +2.7.4 + diff --git a/buildscript b/buildscript index 4abeafa..cef096c 100755 --- a/buildscript +++ b/buildscript @@ -30,7 +30,8 @@ OPENWRT_PKGS="gpioctl-sysfs libugpio fastd haserl" ## See http://www.open-mesh.org/projects/batman-adv/wiki/Compatversion GLUON=(gluon https://github.com/freifunk-gluon/packages.git - 8b65619f59c3bdce743c2f2fb2588fdd7079355a) + 8b65619f59c3bdce743c2f2fb2588fdd7079355a + "0001-simple-tc-Use-hotplug.d-iface-instead-of-hotplug.d-n.patch") GLUON_PKGS="kmod-batman-adv-legacy micrond simple-tc uradvd" #official openwrt routing packages diff --git a/src/packages/fff/fff-web/Makefile b/src/packages/fff/fff-web/Makefile index 723d9a9..8e5d689 100644 --- a/src/packages/fff/fff-web/Makefile +++ b/src/packages/fff/fff-web/Makefile @@ -13,7 +13,7 @@ define Package/fff-web CATEGORY:=Freifunk TITLE:= Freifunk-Franken Webinterface URL:=http://www.freifunk-franken.de - DEPENDS:=+uhttpd +libustream-mbedtls +haserl +px5g +simple-tc +fff-boardname + DEPENDS:=+uhttpd +libustream-mbedtls +haserl +px5g +simple-tc +fff-boardname +fff-network endef define Package/fff-web/description diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html index abfbf52..e7bc3e9 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/settings.html @@ -23,7 +23,7 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then # Bitratenbegrenzung if [ "$POST_traffic_limit" == "on" ] ; then - uci -q set "simple-tc.example.ifname=$(uci -q get network.wan.ifname)" + uci -q set "simple-tc.example.ifname=wan" uci -q set "simple-tc.example.enabled=1" else uci -q set "simple-tc.example.enabled=0" @@ -32,6 +32,7 @@ if [ "$REQUEST_METHOD" == "POST" ] ; then uci -q set "simple-tc.example.limit_egress=${POST_limit_egress}" uci commit + MSG='Daten gespeichert! - Bitte Router neustarten.' fi fi diff --git a/src/packages/fff/fff/Makefile b/src/packages/fff/fff/Makefile index b039c2d..8e13bdf 100644 --- a/src/packages/fff/fff/Makefile +++ b/src/packages/fff/fff/Makefile @@ -28,7 +28,8 @@ define Package/fff-base +fff-sysupgrade \ +fff-wireless \ +fff-timeserver \ - +fff-vpn-select + +fff-vpn-select \ + +simple-tc endef define Package/fff-base/description