Use 'expect fork' when starting avahi-daemon

We need to wait for avahi-daemon to fork otherwise e.g. 'start avahi'
returns immediately, i.e. before the daemon is ready to serve. This is
a problem for Avahi-using programs - such as p2p-server - that assumes
(and rightly so) that Avahi is running and operational when its
Upstart job has been started. This CL fixes this problem by simply

  1. Requesting avahi-daemon to fork by passing the --daemonize option
  2. Instructing Upstart to wait for avahi-daemon to fork

BUG=None
TEST=Manually tested

Change-Id: I122ec1bb4d7bef77377dd80ced50c0e647a25cbf
Reviewed-on: https://gerrit.chromium.org/gerrit/60792
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
1 file changed