/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to network-hooks.d/wireless

  • Committer: teddy at recompile
  • Date: 2011-12-31 12:08:11 UTC
  • mto: This revision was merged to the branch mainline in revision 541.
  • Revision ID: teddy@recompile.se-20111231120811-pkvvjmqm53fx7w9x
* network-hooks.s/wireless (start): Wait until interface is up.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
                kill -0 $sleep 2>/dev/null || break
83
83
                STATE=`"$wpa_cli" -p "$CTRLDIR" -i "$INTERFACE" status | sed -n -e 's/^wpa_state=//p'`
84
84
                if [ "$STATE" = COMPLETED ]; then
85
 
                    kill $sleep 2>/dev/null
86
 
                    break
 
85
                    while :; do
 
86
                        kill -0 $sleep 2>/dev/null || break 2
 
87
                        UP=`cat /sys/class/net/"$INTERFACE"/operstate`
 
88
                        if [ "$UP" = up ]; then
 
89
                            kill $sleep 2>/dev/null
 
90
                            break 2
 
91
                        fi
 
92
                        sleep 1
 
93
                    done
87
94
                fi
88
95
                sleep 1
89
96
            done &