Check for presence of wlan1
This commit is contained in:
parent
9dfbcea165
commit
90eb44d9cb
|
@ -147,7 +147,10 @@ function mesh_batman {
|
|||
echo 'BRIDGE=br-mesh' >> $batman_script
|
||||
echo 'IFACE=wlan0' >> $batman_script
|
||||
echo 'EIFACE=eth0' >> $batman_script
|
||||
echo 'IFACE_EXISTS=$(grep "$IFACE" /proc/net/dev)' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo 'if grep -q "wlan1" /proc/net/dev; then' >> $batman_script
|
||||
echo ' IFACE=wlan1' >> $batman_script
|
||||
echo 'fi' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo 'if [ -e /etc/default/batctl ]; then' >> $batman_script
|
||||
echo ' . /etc/default/batctl' >> $batman_script
|
||||
|
@ -230,7 +233,7 @@ function mesh_batman {
|
|||
echo ' fi' >> $batman_script
|
||||
echo '}' >> $batman_script
|
||||
echo '' >> $batman_script
|
||||
echo 'if [ ! $IFACE_EXISTS ]; then' >> $batman_script
|
||||
echo 'if ! grep -q "$IFACE" /proc/net/dev; then' >> $batman_script
|
||||
echo ' echo "Interface $IFACE was not found"' >> $batman_script
|
||||
echo ' stop' >> $batman_script
|
||||
echo ' exit 1' >> $batman_script
|
||||
|
|
Loading…
Reference in New Issue