summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/avahi/avahi.install
blob: f0beca8cd62f2022ea744e2f56f4ae9d3f4117da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
post_install() {
  echo -n "adding avahi system group... "
  groupadd -g 84 avahi && echo "done."
  echo -n "adding avahi system user... "
  useradd -c "Avahi daemon" -u 84 -d / -g avahi -s /bin/false avahi \
    && echo "done."
  passwd -l avahi &>/dev/null

  post_upgrade
  cat << 'EOM'
==> The following daemons may be added to DAEMONS in /etc/rc.conf:
 -> avahi-daemon   - the mdns responder, you probably want this.
                     dbus needs to be running when you start it.
 -> avahi-dnsconfd - daemon used for peer-to-peer automatic dns
                     configuration on dhcp-less networks.

==> To use some of the client applications you will have to install python.
 -> In addition, pygtk is required for the graphical ones and
    twisted-web for avahi-bookmarks.

EOM
}

post_upgrade() {
  true
}

pre_remove() {
  # pre_remove gets called whenever post_remove is defined.
  true
}

post_remove() {
  # post_remove doesn't start at a newline like the other post_* functions,
  # so we'll have to make one for ourselves.
  echo -n -e "\nremoving avahi system user... "
  userdel avahi && echo "done."
}

op=$1
shift
$op $*