Getting wpa_action to run dhclient after wpa_supplicant connects

Curtis Larsen curtlarsen
Mon Apr 18 16:25:07 PDT 2011


On Fri, Apr 15, 2011 at 8:06 AM, Jouni Malinen <j at w1.fi> wrote:
> On Thu, Apr 14, 2011 at 07:59:42PM -0600, Curtis Larsen wrote:
>> 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?
>
> #!/bin/sh
>
> IFNAME=$1
> CMD=$2
>
> if [ "$CMD" = "CONNECTED" ]; then
> ? ?dhclient $IFNAME
> fi

...Just what I needed.  Thanks.



More information about the Hostap mailing list