From 871435fdb5019e34875e9b87c38e45a90f1af806 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Thu, 4 Jun 2009 14:55:58 +0200 Subject: [PATCH] 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 --- package/avahi/busybox-udhcpc-default.script | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.30.2