Skip to contentSkip to conversation

package/busybox: fix avahi-autoipd error message

Buildroot Peter Korsgaard 1 participant 1 message Sep 5, 2020

lore
Share & tools
lore
#0 lore raw

commit: https://git.buildroot.net/buildroot/commit/?id=39acdd9081609c4a92f26e2d3afc790e5d8ec395
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2020.02.x

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.

(cherry picked from commit 3c5ca644ef8dbcccbc40fc3fc56b74bc54782ae4)
---
 package/busybox/udhcpc.script | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/busybox/udhcpc.script +3 -3
index 711963f974..0196351cd5 100755
@@ -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