diff --git a/src/packages/fff/fff-babel-bird2/Makefile b/src/packages/fff/fff-babel-bird2/Makefile index 9c26462b..67efc7a4 100644 --- a/src/packages/fff/fff-babel-bird2/Makefile +++ b/src/packages/fff/fff-babel-bird2/Makefile @@ -12,7 +12,6 @@ define Package/fff-babel-bird2 URL:=https://www.freifunk-franken.de DEPENDS:=+bird2 +bird2c PROVIDES:=fff-babel-implementation - CONFLICTS:=fff-babeld endef define Package/fff-babel-bird2/description diff --git a/src/packages/fff/fff-babel-bird2/files/etc/uci-defaults/30-disable-bird2 b/src/packages/fff/fff-babel-bird2/files/etc/uci-defaults/30-disable-bird2 new file mode 100644 index 00000000..aa46f2a5 --- /dev/null +++ b/src/packages/fff/fff-babel-bird2/files/etc/uci-defaults/30-disable-bird2 @@ -0,0 +1,3 @@ +/etc/init.d/bird disable + +exit 0 diff --git a/src/packages/fff/fff-babel-bird2/files/lib/functions/fff/babeldaemon b/src/packages/fff/fff-babel-bird2/files/lib/functions/fff/babeldaemon/bird2 similarity index 98% rename from src/packages/fff/fff-babel-bird2/files/lib/functions/fff/babeldaemon rename to src/packages/fff/fff-babel-bird2/files/lib/functions/fff/babeldaemon/bird2 index a1740bfa..f2b6e6fc 100644 --- a/src/packages/fff/fff-babel-bird2/files/lib/functions/fff/babeldaemon +++ b/src/packages/fff/fff-babel-bird2/files/lib/functions/fff/babeldaemon/bird2 @@ -44,7 +44,7 @@ babel_apply() { return 0 } -babel_reload() { +babel_reload_implementation() { # Change include file path, so bird uses the correct configuration, depending on the configuration state: # - If test mode is active (and /tmp/bird-babel exists), switch to the temporary (/tmp) configuration to be tested. # - If new settings are applied or the old settings are restored after an unsuccessful test (and /tmp/bird-babel does not exist), diff --git a/src/packages/fff/fff-babel/files/lib/functions/fff/babel b/src/packages/fff/fff-babel/files/lib/functions/fff/babel index 2e3d3f2e..8233cb20 100644 --- a/src/packages/fff/fff-babel/files/lib/functions/fff/babel +++ b/src/packages/fff/fff-babel/files/lib/functions/fff/babel @@ -1,4 +1,6 @@ -. /lib/functions/fff/babeldaemon + +implementation=babeld +. /lib/functions/fff/babeldaemon/$implementation babel_add_iifrules() { [ "$#" -ne "1" ] && return 1 @@ -62,3 +64,26 @@ babel_add_peer6addr() { return 0 } + +babel_reload() { + # switch implementation + case $implementation in + bird2) + /etc/init.d/babeld stop 2>/dev/null + /etc/init.d/babeld disable + /etc/init.d/bird enable + /etc/init.d/bird start + ;; + babeld) + /etc/init.d/bird stop 2>/dev/null + /etc/init.d/bird disable + /etc/init.d/babeld enable + /etc/init.d/babeld start + ;; + esac + + # call implementation-specific reload commands + babel_reload_implementation + + return 0 +} diff --git a/src/packages/fff/fff-babeld/files/etc/uci-defaults/30-disable-babeld b/src/packages/fff/fff-babeld/files/etc/uci-defaults/30-disable-babeld new file mode 100644 index 00000000..e14dd4b9 --- /dev/null +++ b/src/packages/fff/fff-babeld/files/etc/uci-defaults/30-disable-babeld @@ -0,0 +1,3 @@ +/etc/init.d/babeld disable + +exit 0 diff --git a/src/packages/fff/fff-babeld/files/lib/functions/fff/babeldaemon b/src/packages/fff/fff-babeld/files/lib/functions/fff/babeldaemon/babeld similarity index 97% rename from src/packages/fff/fff-babeld/files/lib/functions/fff/babeldaemon rename to src/packages/fff/fff-babeld/files/lib/functions/fff/babeldaemon/babeld index fe584339..ec033794 100644 --- a/src/packages/fff/fff-babeld/files/lib/functions/fff/babeldaemon +++ b/src/packages/fff/fff-babeld/files/lib/functions/fff/babeldaemon/babeld @@ -63,7 +63,7 @@ babel_apply() { uci commit babeld } -babel_reload() { +babel_reload_implementation() { return 0 } diff --git a/src/packages/fff/fff-layer3/Makefile b/src/packages/fff/fff-layer3/Makefile index 7e9f08ba..782fbd16 100644 --- a/src/packages/fff/fff-layer3/Makefile +++ b/src/packages/fff/fff-layer3/Makefile @@ -13,6 +13,7 @@ define Package/fff-layer3 DEPENDS:=+fff-alfred-monitoring-proxy \ +fff-babel \ +fff-babeld \ + +fff-babel-bird2 \ +fff-boardname \ +fff-dhcp \ +fff-layer3-config \