package/busybox: fix avahi-autoipd error message
authorLukasz Tekieli <tekieli.lukasz@gmail.com>
Thu, 23 Jul 2020 17:19:17 +0000 (19:19 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 31 Aug 2020 20:03:59 +0000 (22:03 +0200)
When using a combination of udhcpc and avahi-autoipd in case of receiving IP
from a DHCP server, the following message can be seen:
"Failed to kill daemon: No such file or directory".
Add a check for a running avahi-autoipd to fix this issue.

Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/busybox/udhcpc.script

index 711963f974e31a5e932c7154da0895a20a65d354..0196351cd5a006b30d33b45a77c47ef20735000e 100755 (executable)
@@ -42,19 +42,19 @@ case "$1" in
                rm -f $TMPFILE
 
                if [ -x /usr/sbin/avahi-autoipd ]; then
-                       /usr/sbin/avahi-autoipd -k $interface
+                       /usr/sbin/avahi-autoipd -c $interface && /usr/sbin/avahi-autoipd -k $interface
                fi
                ;;
 
        leasefail|nak)
                if [ -x /usr/sbin/avahi-autoipd ]; then
-                       /usr/sbin/avahi-autoipd -wD $interface --no-chroot
+                       /usr/sbin/avahi-autoipd -c $interface || /usr/sbin/avahi-autoipd -wD $interface --no-chroot
                fi
                ;;
 
        renew|bound)
                if [ -x /usr/sbin/avahi-autoipd ]; then
-                       /usr/sbin/avahi-autoipd -k $interface
+                       /usr/sbin/avahi-autoipd -c $interface && /usr/sbin/avahi-autoipd -k $interface
                fi
                /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
                if [ -n "$ipv6" ] ; then