From d18cfafb3d13ac0988ba39c6161e1cdc0e82b9fb Mon Sep 17 00:00:00 2001 From: mart Date: Fri, 7 Jan 2022 21:07:30 +0100 Subject: [PATCH 1/2] Clean up, new versions of batman-adv, remove batadv debugfs deps --- group_vars/all.yml | 19 ++----------------- group_vars/freifunk.yml | 8 ++++---- templates/freifunk-files/update.sh | 4 ++-- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/group_vars/all.yml b/group_vars/all.yml index 6eab9be..4247af7 100644 --- a/group_vars/all.yml +++ b/group_vars/all.yml @@ -4,40 +4,25 @@ ## admins on the gateway that are allowd to execute sudo admins: - - l3d - mart - - raoul - - kpanic + - wolf + - xperimental - alex ## accounts who should be created on gateway accounts: - - l3d - mart - - raoul - - kpanic - wolf - xperimental - alex ## users for remote login with their ssh public key users: - l3d: - - l3d@pinkie.l3d.yt - - l3d@backup.l3d.yt - - l3d@business.wingcon.com - - l3d@derpy.l3d.yt - - l3d@mobile.l3d.yt - - l3d@backup-rsa.l3d.yt mart: - mart@ffbsee.de - mart@kirika - mart@linux-srfv - mart@waldorfschule-ueberlingen.de - kpanic: - - kpanic@hirnduenger.de - raoul: - - raoul@ccczh xperimental: - xperimental@id1 - xperimental@id2 diff --git a/group_vars/freifunk.yml b/group_vars/freifunk.yml index f72c5bd..264d797 100644 --- a/group_vars/freifunk.yml +++ b/group_vars/freifunk.yml @@ -12,12 +12,12 @@ ipv4_dhcp_server: '10.15.224.6' ipv4_dhcp_interface: 'bat0' # some more advanced informations like B.A.T.M.A.N Download Informations -batman_version: '2020.1' -batman_sha256sum: '23abf5576d4594c36a5b6a775f8d2bbd0025f004a8980f68358484f4a0730fbb' +batman_version: '2021.4' +batman_sha256sum: 'cff7a2f160045fd0dbf1f1cd7e35e93bf489e81cb8b9501b3756daa391f3eb1b' # https://downloads.open-mesh.org/batman/releases/batman-adv-{{ batman_version }}/batman-adv-{{ batman_version }}.tar.gz -batctl_sha256sum: 'a3e21cbac5f7103925872d80d806d8677f034f8ae8bb6bf6296af81ab028c23b' +batctl_sha256sum: 'b6d96e908e3295a1413e8ec4f0f9851f85c67c752ac45bebbbe58aad40fad8e7' # https://downloads.open-mesh.org/batman/releases/batman-adv-{{ batman_version }}/batctl-{{ batman_version }}.tar.gz -alfred_sha256sum: 'e0721fb40b46c265433cbe6dfcba854e19dad1b69b62475dd01db7af503ea715' +alfred_sha256sum: '4c79b6c45de4bcc8cbfe64cba9a0f8b4ef304ca84c194622f2bfa41e01e2cb95' # https://downloads.open-mesh.org/batman/stable/sources/alfred/alfred-{{ batman_version }}.tar.gz' fastd_libsodium_version: '1.0.18' diff --git a/templates/freifunk-files/update.sh b/templates/freifunk-files/update.sh index 0d4aca4..66d98f1 100755 --- a/templates/freifunk-files/update.sh +++ b/templates/freifunk-files/update.sh @@ -133,7 +133,7 @@ if [ $run_mesh = true ]; then ip addr add "$mesh_ipv4_addr/20" dev bat0 2> /dev/null && echo "(I) Add IPv4-Address $mesh_ipv4_addr to bat0" # Add IPv6 address the same way the routers do. # This makes the address consistent with the one used on the routers status page. - macaddr="$(cat /sys/kernel/debug/batman_adv/bat0/originators | awk -F'[/ ]' '{print $7; exit;}')" + macaddr="$(batctl o | awk -F'[/ ]' '{print $7; exit;}')" euiaddr="$(ula_addr $ff_prefix $macaddr)" echo "(I) Set EUI64-Address: $euiaddr" ip a a "$euiaddr/64" dev bat0 @@ -212,7 +212,7 @@ if [ $run_mesh = true ]; then IFS=" " nd=0 - for entry in $(cat /sys/kernel/debug/batman_adv/bat0/originators | tr '\t/[]()' ' ' | awk '{ if($1==$4) print($1, $3, $5) }'); do + for entry in $(batctl o | sed "s/\*//g" | tr '\t/[]()' ' ' | awk '{ if($1==$4) print($1, $3, $5) }'); do [ $nd -eq 0 ] && nd=1 || echo -n ", " IFS=" " printLink $entry From 407bb36bc167ad398cc09a44df9615c1a00c2739 Mon Sep 17 00:00:00 2001 From: mart-ffbsee Date: Wed, 23 Feb 2022 21:23:02 +0100 Subject: [PATCH 2/2] fix missing if clause concerning dhcrelay --- templates/freifunk-files/update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/freifunk-files/update.sh b/templates/freifunk-files/update.sh index 66d98f1..f6090c3 100755 --- a/templates/freifunk-files/update.sh +++ b/templates/freifunk-files/update.sh @@ -234,7 +234,9 @@ if [ $run_gateway = true ]; then fi fi if [ $dhcp_relay = true ]; then + if ! is_running "dhcrelay"; then systemctl restart isc-dhcp-relay.service + fi else if ! is_running "dhcpd"; then echo "(I) Start DHCP-Server."