Help with wpa_cli not executing a "kill -usr1" action

Arend van Spriel arend
Wed May 1 05:20:33 PDT 2013


On 05/01/2013 10:50 AM, David Linares wrote:
> On 30 April 2013 20:54, Jouni Malinen <j at w1.fi> wrote:
>> On Tue, Apr 30, 2013 at 06:24:49PM +0100, David Linares wrote:
>>> And here is the content of my /tmp/wpa_cli-action.sh script that I
>>> pass to wpa_cli:
>>
>>>          echo "CONNECTED"
>>>          PIDOF_UDHCPC=`pidof udhcpc`
>>>          if [[ "$PIDOF_UDHCPC" != "" ]]; then
>>>                  echo "Sending SIGUSR1 to process $PIDOF_UDHCPC"
>>>                  kill -usr1 $PIDOF_UDHCPC
>>>          fi
>>
>>>  From the wpa_cli, I am getting the echos (CONNECTED and Sending...)
>>> but it doesn't seem that my signal is sent to udhcpc as my IP address
>>> is not renewed when looking at ifconfig.
>>> By doing a  kill -usr1 `pidof udhcpc`  directly from the command line,
>>> straight away, a new IP is requested and updated a few seconds later.
>>
>>> Then, does anybody know if there is a limitation from the wpa_cli
>>> command-line tool not being able to execute a kill command? I will try
>>> the last version (2.0) tomorrow.
>>
>> wpa_cli does not prevent that. Are you running this process under a
>> user account that has privileges to execute that kill command on udhcpc?
>> Have you verified that running that wpa_cli-action.sh script of your
>> manually from the command line works?
>>
>
> Thanks a lot Jouni.
> Today I have done more tests by launching the script manually from
> command line after I get connected to my 2nd connection.
> I noticed that I need to execute it twice to have an effect.
> Same thing by just using "kill -usr1 <pid>" from command line, I need
> to send the SIGUSR1 twice to udhcpc in order get a new IP address.

Do you mean a) new and different IP address or b) a new lease for an IP 
address that may or may not be the same.

Regards,
Arend





More information about the Hostap mailing list