From fdf20a19cdcc5d416553ba03352a7df988a3a159 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sun, 9 Aug 2015 19:28:03 +0100 Subject: [PATCH] wlan 2 and 3 --- src/freedombone | 10 ++++++++++ src/freedombone-client | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/freedombone b/src/freedombone index 012d53b6..874df43e 100755 --- a/src/freedombone +++ b/src/freedombone @@ -1738,6 +1738,16 @@ function mesh_babel { echo ' IFACE=wlan1' >> $babel_script echo ' fi' >> $babel_script echo 'fi' >> $babel_script + echo 'if [[ $IFACE == "wlan0" ]]; then' >> $babel_script + echo ' if grep -q "wlan2" /proc/net/dev; then' >> $babel_script + echo ' IFACE=wlan2' >> $babel_script + echo ' fi' >> $babel_script + echo 'fi' >> $babel_script + echo 'if [[ $IFACE == "wlan0" ]]; then' >> $babel_script + echo ' if grep -q "wlan3" /proc/net/dev; then' >> $babel_script + echo ' IFACE=wlan3' >> $babel_script + echo ' fi' >> $babel_script + echo 'fi' >> $babel_script echo '' >> $babel_script echo 'if [[ ! grep -q "$IFACE" /proc/net/dev || $1 == "stop" ]]; then' >> $babel_script echo ' if ! grep -q "$IFACE" /proc/net/dev; then' >> $babel_script diff --git a/src/freedombone-client b/src/freedombone-client index a3939943..9ef6e7a0 100755 --- a/src/freedombone-client +++ b/src/freedombone-client @@ -131,6 +131,16 @@ function mesh_babel { echo ' IFACE=wlan1' >> $babel_script echo ' fi' >> $babel_script echo 'fi' >> $babel_script + echo 'if [[ $IFACE == "wlan0" ]]; then' >> $babel_script + echo ' if grep -q "wlan2" /proc/net/dev; then' >> $babel_script + echo ' IFACE=wlan2' >> $babel_script + echo ' fi' >> $babel_script + echo 'fi' >> $babel_script + echo 'if [[ $IFACE == "wlan0" ]]; then' >> $babel_script + echo ' if grep -q "wlan3" /proc/net/dev; then' >> $babel_script + echo ' IFACE=wlan3' >> $babel_script + echo ' fi' >> $babel_script + echo 'fi' >> $babel_script echo '' >> $babel_script echo 'if [[ ! grep -q "$IFACE" /proc/net/dev || $1 == "stop" ]]; then' >> $babel_script echo ' if ! grep -q "$IFACE" /proc/net/dev; then' >> $babel_script @@ -202,6 +212,16 @@ function mesh_batman { echo ' IFACE=wlan1' >> $batman_script echo ' fi' >> $batman_script echo 'fi' >> $batman_script + echo 'if [[ $IFACE == "wlan0" ]]; then' >> $batman_script + echo ' if grep -q "wlan2" /proc/net/dev; then' >> $batman_script + echo ' IFACE=wlan2' >> $batman_script + echo ' fi' >> $batman_script + echo 'fi' >> $batman_script + echo 'if [[ $IFACE == "wlan0" ]]; then' >> $batman_script + echo ' if grep -q "wlan3" /proc/net/dev; then' >> $batman_script + echo ' IFACE=wlan3' >> $batman_script + echo ' fi' >> $batman_script + echo 'fi' >> $batman_script echo '' >> $batman_script echo 'if [ -e /etc/default/batctl ]; then' >> $batman_script echo ' . /etc/default/batctl' >> $batman_script