/mandos/release

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

« back to all changes in this revision

Viewing changes to network-hooks.d/wireless

  • Committer: Teddy Hogeborn
  • Date: 2011-12-30 17:57:46 UTC
  • mto: (237.7.89 trunk)
  • mto: This revision was merged to the branch mainline in revision 290.
  • Revision ID: teddy@recompile.se-20111230175746-qz41pq522ljm0vw9
* network-hooks.d/wireless (start): Bug fixes: Don't shadow "$DELAY".
                                    Supress unwanted error messages.
  (modules): Bug fix: Parse new config file syntax.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        "$wpa_supplicant" -B -g "$CTRL" -p "$CTRLDIR" $WPAS_OPTIONS
69
69
        for INTERFACE in $interfaces; do
70
70
            DRIVER=`eval 'echo "$WPA_DRIVER_'"$INTERFACE"\"`
71
 
            DELAY=`eval 'echo "$DELAY_'"$INTERFACE"\"`
 
71
            IFDELAY=`eval 'echo "$DELAY_'"$INTERFACE"\"`
72
72
            "$wpa_cli" -g "$CTRL" interface_add "$INTERFACE" "" \
73
73
                "${DRIVER:-wext}" "$CTRLDIR" > /dev/null \
74
74
                | sed -e '/^OK$/d'
76
76
            eval wpa_interface_"$INTERFACE"
77
77
            "$wpa_cli" -p "$CTRLDIR" -i "$INTERFACE" enable_network \
78
78
                "$NETWORK" | sed -e '/^OK$/d'
79
 
            ( sleep "${DELAY:-$DELAY}" || : ) &
 
79
            ( sleep "${IFDELAY:-$DELAY}" || : ) &
80
80
            sleep=$!
81
81
            while :; do
82
 
                kill -0 $sleep || break
 
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
 
85
                    kill $sleep 2>/dev/null
86
86
                    break
87
87
                fi
88
88
                sleep 1
130
130
        if [ "$IPADDRS" = dhcp ]; then
131
131
            echo af_packet
132
132
        fi
133
 
        sed -n -e 's/#.*$//' -e 's/[    ]*$//' -e 's/^MODULE=//p' \
134
 
            "$CONFIG"
 
133
        sed -n -e 's/#.*$//' -e 's/[    ]*$//' \
 
134
            -e 's/^MODULE_[^=]\+=//p' "$CONFIG"
135
135
        ;;
136
136
esac