From: Peter Korsgaard Date: Thu, 4 Jun 2009 12:55:58 +0000 (+0200) Subject: avahi: udhcpc default.script: only bring up avahi-autoipd on nak/timeout X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=871435fdb5019e34875e9b87c38e45a90f1af806;p=buildroot.git avahi: udhcpc default.script: only bring up avahi-autoipd on nak/timeout The avahi udhcpc script used to start up avahi-autoipd at defconfig (init) time, and then kill it if a dhcp lease was acquired, leading to extra network traffic. Change it to only start avahi-autoipd on timeout and dhcp nak. Signed-off-by: Peter Korsgaard --- diff --git a/package/avahi/busybox-udhcpc-default.script b/package/avahi/busybox-udhcpc-default.script index cc89feba72..0bb3dea03c 100755 --- a/package/avahi/busybox-udhcpc-default.script +++ b/package/avahi/busybox-udhcpc-default.script @@ -18,6 +18,12 @@ case "$1" in if [ $? -eq 0 ]; then /sbin/ifconfig $interface 0.0.0.0 fi + if [ -x /usr/sbin/avahi-autoipd ]; then + /usr/sbin/avahi-autoipd -k $interface + fi + ;; + + leasefail|nak) if [ -x /usr/sbin/avahi-autoipd ]; then /usr/sbin/avahi-autoipd -wD $interface --no-chroot fi