Getting wpa_action to run dhclient after wpa_supplicant connects

Pavel Roskin proski
Wed Apr 13 09:03:04 PDT 2011

On 04/13/2011 05:39 AM, Kalle Valo wrote:
> Curtis Larsen<curtlarsen at>  writes:
>> On Tue, Apr 12, 2011 at 9:27 AM, Jouni Malinen<j at>  wrote:
>>> Is your /bin/sh dash? If so, that "==" operator should have been "="
>>> (bash supports ==, but dash does not).
>> No.  I am using bash.  Any other ideas?
> Please double check because I'm getting exactly the same error with
> dash but not with bash. What does 'ls -l /bin/sh' show? Or if you
> change the first line in the script to use /bin/bash?

There should be at least one valid statement between "then" and "fi". 
Just put a colon before the hash mark.

wpa_supplicant/README should be fixed, but I guess we want something 
more readable and meaningful there, for instance

if [ "$CMD" = "DISCONNECTED" ]; then
     # remove network configuration, if needed

Pavel Roskin

More information about the Hostap mailing list