[PATCH v2] fff-wireless: Reintroduce initial setup of wireless interfaces

Tim Niemeyer tim at tn-x.org
So Okt 8 19:24:27 CEST 2017


Hi Adrian

Das löst das Problem leider nicht:
--- %< ---
Fixing MAC on br-mesh (mesh)                                              
+ sleep 10                                                                
+ cat /sys/class/net/w2mesh/address                                       
cat: can't open '/sys/class/net/w2mesh/address': No such file or directory
+ NEW_MACADDR=                                               
+ uci set network.mesh.macaddr=                              
+ uci commit                                                 
--- >% ---

:(

Ich befürchte wir müssen das richtig fixen. Das dauert dann zwar
länger, aber so artet das dann doch irgendwann in Zufall aus, ob es
geht oder nicht.

Tim

Am Sonntag, den 08.10.2017, 16:23 +0200 schrieb Adrian Schmutzler:
> Workaround!
> 
> This is required as configurenetwork reads the MAC addresses
> from the WiFi interfaces.
> 
> Changes in v2:
>  - Fixed call of wifiAddAP
> 
> Apply only after the KeyX2 patchset!
> 
> Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> ---
>  .../files/etc/uci-defaults/60-fff-wireless         | 32
> ++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 src/packages/fff/fff-wireless/files/etc/uci-
> defaults/60-fff-wireless
> 
> diff --git a/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-
> fff-wireless b/src/packages/fff/fff-wireless/files/etc/uci-
> defaults/60-fff-wireless
> new file mode 100644
> index 0000000..8070cb4
> --- /dev/null
> +++ b/src/packages/fff/fff-wireless/files/etc/uci-defaults/60-fff-
> wireless
> @@ -0,0 +1,32 @@
> +#!/bin/sh
> +# Copyright 2016 Tim Niemeyer
> +# License GPLv3
> +
> +. /lib/functions/fff/wireless
> +
> +if ! wifiDelAll; then
> +	echo "Can't delete current wifi setup"
> +	exit 1
> +fi
> +
> +for phy in $(iw phy | awk '/^Wiphy/{ print $2 }'); do
> +	radio="$(wifiAddPhyCond "$phy" "2" "1")"
> +	radio5="$(wifiAddPhyCond "$phy" "5" "36")"
> +	[ -n "$radio5" ] && radio="$radio5"
> +	if [ -z "$radio" ]; then
> +		echo "Can't create radio for $phy"
> +		exit 1
> +	fi
> +
> +	if ! wifiAddAP "$radio" "do.not.use" "mesh" "ap" "0"; then
> +		echo "Can't add AP interface on $radio."
> +		exit 1
> +	fi
> +
> +	if ! wifiAddAdHocMesh "$radio" "batman.do.not.use"
> "02:CA:FF:EE:BA:BE"; then
> +		echo "Can't add AdHocMesh interface on $radio."
> +		exit 1
> +	fi
> +done
> +
> +# vim: set noexpandtab:tabstop=4
> -- 
> 2.7.4
> 
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 488 bytes
Beschreibung: This is a digitally signed message part
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20171008/dd5a5491/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev