Getting wpa_action to run dhclient after wpa_supplicant connects

Curtis Larsen curtlarsen
Thu Apr 14 18:59:42 PDT 2011


On Wed, Apr 13, 2011 at 10:57 AM, Jouni Malinen <j at w1.fi> wrote:
> On Wed, Apr 13, 2011 at 12:03:04PM -0400, Pavel Roskin wrote:
>> 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
>> ? ? ?SSID=
>> fi
>
> Thanks for pointing out the source for this. I looked at
> wpa_supplicant/examples/*.sh and did not notice that case. I modified
> README to make it somewhat less likely for simple copy-paste to result
> in failures.

Putting a valid statement between "then" and "fi" fixed the
..."/sbin/wpa_action.sh: 13: Syntax error: "fi" unexpected" error, but
I still get two "unexpected operator" errors.  Could someone please
actually provide a full good wpa_action.sh script that will simply run
"dhclient wlan2" after wpa_supplicant successfully connects?  I know
it sounds so simple for you experts, but ...yes, I really am that
lost.

Thanks,

Curtis



More information about the Hostap mailing list