Getting wpa_action to run dhclient after wpa_supplicant connects

Jouni Malinen j at w1.fi
Tue Apr 12 11:27:47 EDT 2011


On Tue, Apr 12, 2011 at 06:59:57AM -0600, Curtis Larsen wrote:
> #!/bin/sh

> if [ "$CMD" == "CONNECTED" ]; then

> But I get the following output from the wpa_cli command:
> Selected interface 'wlan2'
> [: 9: CONNECTED: unexpected operator
> /sbin/wpa_action.sh: 13: Syntax error: "fi" unexpected

Is your /bin/sh dash? If so, that "==" operator should have been "="
(bash supports ==, but dash does not).

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list