Modify

Opened 19 months ago

Last modified 19 months ago

#22880 new defect

Coova-Chilli init script bug

Reported by: webtron Owned by: developers
Priority: normal Milestone:
Component: packages Version: Chaos Calmer 15.05
Keywords: coova-chilli init Cc:

Description

When ever I issue /etc/init.d/chilli restart or an ifup occurs on the WAN Coova shuts down and doesn't restart. This is because of the "killall" command in the stop function of /etc/init.d/chilli. If I comment the killall out it works as intended. The killall command seems to kill the init script process causing it to stop there and not cleanup the /var/run/chilli* files or run the start function.
Coova-Chilli on Openwrt 15.05.1 r49400
stop() {

ls /var/run/chilli*.pid 2>/dev/null && {

kill $(cat /var/run/chilli*.pid)
sleep 1
killall -9 chilli
rm -f /var/run/chilli*

}

}

Attachments (0)

Change History (1)

comment:1 Changed 19 months ago by webtron

Update on this
This bug is present in the trunk too.
By commenting out the killall command I ended up with multiple instance of Coova running with the same config so I've changed the stop function and all works now as expected. I don't know how to write a patch for Openwrt so if someone can create a patch from below it would be great.
Change this stop function in /etc/init.d/chilli
from

stop() {

    ls /var/run/chilli*.pid 2>/dev/null && {

        kill $(cat /var/run/chilli*.pid)
        sleep 1
        killall -9 chilli
        rm -f /var/run/chilli*

    }

}

to

stop() {
    for pID in $( pgrep chilli )
     do
       kill  $pID
     done
    rm -f /var/run/chilli*
}

I've tested this with single and multiple instances of Coova configured and it works as expected. I can now restart and reload Coova successfully.

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.