From e4f0e9de3bf87cb2f16bd8a5140ca0d4e4a1052f Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 8 Aug 2015 15:50:56 +0100 Subject: [PATCH] avahi daemon --- src/freedombone | 4 +++- src/freedombone-client | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/freedombone b/src/freedombone index e4aabe3d..10807cae 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1699,6 +1699,7 @@ function mesh_babel { echo ' echo "Interface $IFACE was not found"' >> $babel_script echo ' else' >> $babel_script echo ' echo "Stopping"' >> $babel_script + echo ' avahi-autoipd -k $IFACE' >> $babel_script echo ' fi' >> $babel_script echo ' ifconfig $IFACE down' >> $babel_script echo ' pkill babeld' >> $babel_script @@ -1813,7 +1814,7 @@ function mesh_batman_bridge { echo ' modprobe batman-adv' >> $batman_script echo ' batctl if add $IFACE' >> $batman_script echo ' ifconfig $IFACE up' >> $batman_script - echo ' avahi-autoipd $IFACE' >> $batman_script + echo ' avahi-autoipd -D $IFACE' >> $batman_script echo ' ifconfig bat0 up promisc' >> $batman_script echo '' >> $batman_script echo ' #Use persistent HWAddr' >> $batman_script @@ -1855,6 +1856,7 @@ function mesh_batman_bridge { echo ' rmmod batman-adv' >> $batman_script echo ' ifconfig $IFACE mtu 1500' >> $batman_script echo ' ifconfig $IFACE down' >> $batman_script + echo ' avahi-autoipd -k $IFACE' >> $batman_script echo ' iwconfig $IFACE mode managed' >> $batman_script echo '' >> $batman_script echo ' systemctl restart network-manager' >> $batman_script diff --git a/src/freedombone-client b/src/freedombone-client index cf192019..a67af5db 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -122,6 +122,7 @@ function mesh_babel { echo ' echo "Interface $IFACE was not found"' >> $babel_script echo ' else' >> $babel_script echo ' echo "Stopping"' >> $babel_script + echo ' avahi-autoipd -k $IFACE' >> $babel_script echo ' fi' >> $babel_script echo ' ifconfig $IFACE down' >> $babel_script echo ' pkill babeld' >> $babel_script @@ -142,7 +143,7 @@ function mesh_babel { echo -n 'iwconfig $IFACE mode ad-hoc channel ' >> $babel_script echo "$WIFI_CHANNEL essid \"$ESSID\"" >> $babel_script echo 'ifconfig $IFACE up' >> $babel_script - echo 'avahi-autoipd $IFACE' >> $babel_script + echo 'avahi-autoipd -D $IFACE' >> $babel_script echo -n 'ifconfig $IFACE:avahi ' >> $babel_script echo -n "$LOCAL_NETWORK_STATIC_IP_ADDRESS netmask " >> $babel_script echo '255.255.255.0 broadcast 192.168.13.255' >> $babel_script @@ -220,6 +221,7 @@ function mesh_batman { echo ' modprobe batman-adv' >> $batman_script echo ' batctl if add $IFACE' >> $batman_script echo ' ifconfig $IFACE up' >> $batman_script + echo ' avahi-autoipd -D $IFACE' >> $batman_script echo ' ifconfig bat0 up promisc' >> $batman_script echo '' >> $batman_script echo ' #Use persistent HWAddr' >> $batman_script @@ -243,11 +245,11 @@ function mesh_batman { echo '}' >> $batman_script echo '' >> $batman_script echo 'stop() {' >> $batman_script - echo ' if [ -z "$IFACE" ] ; then' >> $batman_script + echo ' if [ -z "$IFACE" ]; then' >> $batman_script echo ' echo "error: unable to find wifi interface, not enabling batman-adv mesh"' >> $batman_script echo ' return' >> $batman_script echo ' fi' >> $batman_script - echo ' if [ "$EIFACE" ] ; then' >> $batman_script + echo ' if [ "$EIFACE" ]; then' >> $batman_script echo ' brctl delif $BRIDGE bat0' >> $batman_script echo ' brctl delif $BRIDGE $EIFACE' >> $batman_script echo ' ifconfig $BRIDGE down || true' >> $batman_script @@ -261,6 +263,7 @@ function mesh_batman { echo ' rmmod batman-adv' >> $batman_script echo ' ifconfig $IFACE mtu 1500' >> $batman_script echo ' ifconfig $IFACE down' >> $batman_script + echo ' avahi-autoipd -k $IFACE' >> $batman_script echo ' iwconfig $IFACE mode managed' >> $batman_script echo '' >> $batman_script echo ' if [ -f /bin/systemctl ]; then' >> $batman_script