Lines Matching +full:avahi +full:- +full:daemon
2 # Use of this source code is governed by a BSD-style license that can be
18 """Helper object to start up avahi in a network chroot.
20 Creates a virtual ethernet pair to enable communication with avahi.
21 Does the necessary work to make avahi appear on DBus and allow it
26 SERVICES_TO_STOP = ['avahi']
29 # We'll drop the Avahi side into our network namespace.
33 AVAHI_CONFIG_FILE = 'etc/avahi/avahi-daemon.conf'
37 'host-name-from-machine-id=yes\n'
38 'browse-domains=\n'
39 'use-ipv4=yes\n'
40 'use-ipv6=no\n'
41 'ratelimit-interval-usec=1000000\n'
42 'ratelimit-burst=1000\n'
43 '[wide-area]\n'
44 'enable-wide-area=no\n'
46 'publish-hinfo=no\n'
47 'publish-workstation=no\n'
48 'publish-aaaa-on-ipv4=no\n'
49 'publish-a-on-ipv6=no\n'
51 'rlimit-core=0\n'
52 'rlimit-data=4194304\n'
53 'rlimit-fsize=1024\n'
54 'rlimit-nofile=768\n'
55 'rlimit-stack=4194304\n'
56 'rlimit-nproc=10\n',
60 'avahi:*:238:238::/dev/null:/bin/false\n',
63 'avahi:x:238:\n',
65 AVAHI_LOG_FILE = '/var/log/avahi.log'
66 AVAHI_PID_FILE = 'run/avahi-daemon/pid'
71 """Construct a chrooted instance of Avahi.
75 to the end Avahi is listening on.
89 The network chroot works by isolating avahi inside with one end of a
91 other end in order to talk to avahi.
101 """@return string ip address of interface belonging to avahi."""
107 """@return string hostname claimed by avahi on |self.dns_domain|."""
113 """@return string DNS domain in use by avahi (e.g. 'local')."""
118 """Start up the chrooted Avahi instance."""
119 # Prevent weird interactions between services which talk to Avahi.
124 # We don't want Avahi talking to the real world, so give it a nice
136 # By default, take a packet capture of everything Avahi sends out.
139 # We're going to run Avahi in a network namespace to avoid interactions
145 self._chroot.add_root_directories(['etc/avahi', 'etc/avahi/services'])
147 'etc/avahi/hosts'])
149 '/usr/sbin/avahi-daemon --file=/%s >%s 2>&1' %
153 # Wait for Avahi to come up, claim its DBus name, settle on a hostname.
155 while time.time() - start_time < self.AVAHI_UP_TIMEOUT_SECONDS:
160 raise error.TestFail('Avahi did not come up in time.')
164 """Clean up the chrooted Avahi instance."""