summaryrefslogtreecommitdiff
path: root/package/avahi
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-06-04 14:55:58 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2009-06-04 14:58:57 +0200
commit871435fdb5019e34875e9b87c38e45a90f1af806 (patch)
treebde760096f41b7a2c90edad0f0ece198fd4c5864 /package/avahi
parent0ebab19479d48f38d0cae3c5d8480a22fef5c4ab (diff)
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 <jacmet@sunsite.dk>
Diffstat (limited to 'package/avahi')
-rwxr-xr-xpackage/avahi/busybox-udhcpc-default.script6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/avahi/busybox-udhcpc-default.script b/package/avahi/busybox-udhcpc-default.script
index cc89feba7..0bb3dea03 100755
--- a/package/avahi/busybox-udhcpc-default.script
+++ b/package/avahi/busybox-udhcpc-default.script
@@ -19,6 +19,12 @@ case "$1" in
/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
;;