I propose another patch for the same bug.
I have this bug when I have to wireless interface, but only one with a
IP adress.
I still use /proc/net/wireless, but I add a grep step to ensure that
interface have a IP adress.
Regards,
--
Jean-Benoist Leger
--- 0/iodine-client-start 2012-05-18 19:22:48.073442937 +0200
+++ 1/iodine-client-start 2012-05-18 19:27:40.260094742 +0200
@@ -217,8 +217,14 @@
## Find a network interface
if [ -z ${interface} ]; then
- interface=$(tail --lines=+3 /proc/net/wireless \
- | head -1 | tr -d : | awk '{print $1}')
+ interfaces=$(tail --lines=+3 /proc/net/wireless \
+ | tr -d : | awk '{print $1}')
+ for dev in ${interfaces}; do
+ if ip -4 addr show dev ${dev} | grep -q inet; then
+ interface=${dev}
+ fi
+ done
+
fi
if [ -z ${interface} ]; then