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>
This commit is contained in:
parent
0ebab19479
commit
871435fdb5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user