Getting wpa_action to run dhclient after wpa_supplicant connects

Jouni Malinen j
Tue Apr 12 08:27:47 PDT 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