[Pkg-utopia-maintainers] Bug#409513: ifup and ifdown slow becouse of avahi-deamon script

Andrzej Zięba a-zieba at go2.pl
Sat Feb 3 17:58:43 UTC 2007


Package: avahi-daemon
Version: 0.6.16-2

Configuring network interfaces at boot and deconfiguring at shut down
takes 10s or so.

If I use 'ifdown -a' and next 'ifdown -a -v' I get the fallowing output:

Configuring interface lo=lo (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
ifconfig lo 127.0.0.1 up
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/mountnfs
Configuring interface eth0=eth0 (inet)
run-parts --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools

ifconfig eth0 192.168.1.98 netmask 255.255.255.0 broadcast 192.168.1.255
                up
  route add default gw 192.168.1.1  eth0
run-parts --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/mountnfs

The time out takes place at the first call to
/etc/network/if-up.d/avahi-daemon before eth0 is actually up.

As far as I can tell the script does not recognise if it is called while
lo is initialised.
Adding something like
[ "$IFACE" != "lo" ] || exit 0
to /etc/network/if-up.d/avahi-daemon could solve the problem at boot.

I think that the long time out at system shut down happens because 
avahi-daemon script is called from /etc/network/if-post-down.d/ and not 
from /etc/network/if-down.d. In current order the avahi-daemon script 
gets executed when eth0 is already down. So whatever this script tries 
to do, it waits 10s before failing. So the link from 
/etc/network/if-post-down.d/ should be moved to /etc/network/if-down.d.
These fixes work with single network adapter, I cant say if it would 
work in other conditions.

And one more thing. If I run 'ps -A' it appears that avahi-daemon has 
two instances.


-- System Information:
Debian Release: 4.0
   APT prefers testing
   APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-3-k7
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)

Versions of packages avahi-daemon depends on:
ii  adduser            3.102        Add and remove users and groups
ii  dbus               1.0.2-1      simple interprocess messaging syst
ii  libavahi-common3   0.6.16-2     Avahi common library
ii  libavahi-core4     0.6.16-2     Avahi's embeddable mDNS/DNS-SD lib
ii  libc6              2.3.6.ds1-10 GNU C Library: Shared libraries
ii  libcap1            1:1.10-14    support for getting/setting POSIX.
ii  libdaemon0         0.10-1       lightweight C library for daemons
ii  libdbus-1-3        1.0.2-1      simple interprocess messaging syst
ii  libexpat1          1.95.8-3.3   XML parsing C library - runtime li

Versions of packages avahi-daemon recommends:
ii  libnss-mdns        0.9-0.1    NSS module for Multicast DNS name

-- no debconf information


-- 
Andrzej Zięba
Pruszcz Gdański
Poland





More information about the Pkg-utopia-maintainers mailing list