[2/5] fff-batman-adv: Set servermode and remove client cronjob in layer3 variant.

Submitted by Robert Langhammer on Jan. 27, 2020, 1:25 p.m.

Details

Message ID 20200127132512.16359-3-rlanghammer@web.de
State New
Headers show

Commit Message

Robert Langhammer Jan. 27, 2020, 1:25 p.m.
Signed-off-by: Robert Langhammer <rlanghammer@web.de>
---
 .../files/etc/uci-defaults/93-fff-batman-adv               | 7 +++++++
 1 file changed, 7 insertions(+)

--
2.20.1

Patch hide | download patch | download mbox

diff --git a/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv b/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv
index 93c822c..cdb53aa 100644
--- a/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv
+++ b/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv
@@ -1,5 +1,7 @@ 
 #!/bin/sh

+. /etc/firmware_release
+
 uci batch <<EOF
   delete batman-adv.bat0
   set batman-adv.bat0=mesh
@@ -15,6 +17,11 @@  uci batch <<EOF
   set batman-adv.bat0.hop_penalty='30'
 EOF

+if [ "$VARIANT" = layer3 ]; then
+	uci set batman-adv.bat0.gw_mode='server'
+	rm /usr/lib/micron.d/fff-batman-adv
+fi
+
 uci commit

 exit 0

Comments

Christian Dresel Jan. 30, 2020, 12:31 a.m.
Wenn es dann ein eigenes package gibt (siehe vorherige Mail) müsste man hier nicht umständlich rum löschen und Varianten abfragen sondern könnte es gleich richtig im package konfigurieren.

Am 27. Januar 2020 14:25:09 MEZ schrieb Robert Langhammer <rlanghammer@web.de>:
>Signed-off-by: Robert Langhammer <rlanghammer@web.de>
>---
> .../files/etc/uci-defaults/93-fff-batman-adv               | 7 +++++++
> 1 file changed, 7 insertions(+)
>
>diff --git
>a/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv
>b/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv
>index 93c822c..cdb53aa 100644
>---
>a/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv
>+++
>b/src/packages/fff/fff-batman-adv/files/etc/uci-defaults/93-fff-batman-adv
>@@ -1,5 +1,7 @@
> #!/bin/sh
>
>+. /etc/firmware_release
>+
> uci batch <<EOF
>   delete batman-adv.bat0
>   set batman-adv.bat0=mesh
>@@ -15,6 +17,11 @@ uci batch <<EOF
>   set batman-adv.bat0.hop_penalty='30'
> EOF
>
>+if [ "$VARIANT" = layer3 ]; then
>+	uci set batman-adv.bat0.gw_mode='server'
>+	rm /usr/lib/micron.d/fff-batman-adv
>+fi
>+
> uci commit
>
> exit 0
>--
>2.20.1