Thread (8 messages) flat view 8 messages, 2 authors, 2012-02-28

[B.A.T.M.A.N.] Fwd: /lib/batman-adv/config.sh

From: Filippo Sallemi <hidden>
Date: 2012-02-26 17:49:44

Ok in this email my proposal patch.
I've to sleep 4s if you have an ap + adhoc vifs.

[ "$(echo $interface | awk '$0 ~ /^wlan[0-9]*/')" ] && sleep 4s

For convenience I sleep only if an wlan was triggered. If you have
only one interface in adhoc mode per radio 3 seconds are enought.

bye

---------- Messaggio inoltrato ----------
Da: Marek Lindner [off-list ref]
Date: 11 febbraio 2012 11:08
Oggetto: Re: /lib/batman-adv/config.sh
A: Filippo Sallemi [off-list ref]


On Friday, February 10, 2012 01:21:21 you wrote:
quoted
Yeah - looks good.
I still don't get why we don't need to wait 3/5 seconds anymore. Can you
explain this ?
No i'm wrong we need to wait 3 seconds... i think that the sleep call
could be moved to hotplug.d/99-batman-adv when an interface is added
to mesh interface.
I need some time.
Ok - I left the "sleep 3s" in the file. I applied your config_bat/bat_config
as well as the forgotten ap_isolation config fix.

Since the for loop does not fix the wait problem why do you wish to change it?
I am referring to your suggested change:

# Load network config here just in case!
config_load network
for iface in $interfaces; do
       # copy iface into ifname
       local ifname=$iface
       [ -f "/sys/class/net/$ifname/batman_adv/mesh_iface" ] || {
               # if ifname was not found try to find it via uci config
               config_get ifname $iface ifname
               [ -f "/sys/class/net/$ifname/batman_adv/mesh_iface" ] ||
continue
       }

       [ "$ifname" = "$interface" ] && echo $mesh >
/sys/class/net/$ifname/batman_adv/mesh_iface
done

bat_add_interface() and bat_del_interface() have the same loop but we only
change one ? The only difference I can see is another added variable and not
calling "uci -q -P/var/state get network.$iface.ifname". Why ?

Cheers,
Marek


-- 
Filippo Sallemi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help