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

David Linares dlinares.linux at
Fri May 3 10:22:05 EDT 2013

Hi Arend,

Thanks a lot for your answer.
I meant b) a new lease for an IP address that may or may not be the same.

I tried something a bit different which works fine:
I send first a SIGUSR2 (to release the current lease), and then a
SIGUSR1(to get a new one).
I just thought sending only one SIGUSR1 should be enough.


On 1 May 2013 13:20, Arend van Spriel <arend at> wrote:
> On 05/01/2013 10:50 AM, David Linares wrote:
>> On 30 April 2013 20:54, Jouni Malinen <j at> wrote:
>>> On Tue, Apr 30, 2013 at 06:24:49PM +0100, David Linares wrote:
>>>> And here is the content of my /tmp/ 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 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