[PATCH v1 3/4] fff-hoods: call reload_config after uci commit

mail at adrianschmutzler.de mail at adrianschmutzler.de
So Jun 10 14:22:04 CEST 2018


Hallo,

ich frage mich gerade, ob man reload_config da an jeder Stelle callen muss
oder ob es ausreicht, das ein einer oder zwei bestimmten Stellen, wo die
config quasi "fertig" ist, dann nur einmal für alles auszulösen?

Grüße

Adrian

> -----Original Message-----
> From: franken-dev [mailto:franken-dev-bounces at freifunk.net] On Behalf
> Of Tim Niemeyer
> Sent: Sonntag, 10. Juni 2018 14:06
> To: franken-dev at freifunk.net
> Subject: [PATCH v1 3/4] fff-hoods: call reload_config after uci commit
> 
> Signed-off-by: Tim Niemeyer <tim at tn-x.org>
> Reviewed-by: Christian Dresel <fff at chrisi01.de>
> ---
> 
> Changes in v1: None
> 
>  src/packages/fff/fff-hoods/files/usr/sbin/configurehood | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> index 42a489d..eaf2578 100755
> --- a/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> +++ b/src/packages/fff/fff-hoods/files/usr/sbin/configurehood
> @@ -56,6 +56,7 @@ if [ -s "$hoodfilecopy" ] && isGatewayAvailable ; then
>  		uci set network.${iface}.proto='static'
>  		uci set network.${iface}.ip6addr='fe80::1/64'
>  		uci commit network
> +		reload_config
>  		if ! wifiAddAP "$radio" "config.franken.freifunk.net"
"$iface"
> "configap" "1"; then
>  			echo "Can't add Config interface on $radio."
>  			exit 1
> @@ -101,6 +102,7 @@ else
> 
>  			uci -q del "system. at system[0].hood"
>  			uci -q commit system
> +			reload_config
> 
>  			sleep 30 # Wait for the config AP, which may be
> created at the same time as this script has started
> 
> @@ -127,6 +129,7 @@ else
>  					uci -q set
network.configSta=interface
>  					uci -q set
> network.configSta.proto='static'
>  					uci -q commit network
> +					reload_config
>  				fi
>  			done
> 
> @@ -232,6 +235,7 @@ if [ -s "$hoodfile" ]; then
>  		echo "Setting hood name: $hood"
>  		uci -q set "system. at system[0].hood=$hood"
>  		uci -q commit system
> +		reload_config
> 
>  		if ! wifiDelIface; then
>  			echo "Can't delete current wifi setup"
> --
> 2.11.0




Mehr Informationen über die Mailingliste franken-dev