autoipd-openrc.sh 696 B

123456789101112131415161718192021222324252627282930313233
  1. # Copyright (C) 2004-2008 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. # Contributed by Sven Wegener (swegener@gentoo.org)
  4. _config_vars="$_config_vars autoipd"
  5. autoipd_depend() {
  6. program /usr/bin/avahi-autoipd
  7. after interface
  8. }
  9. autoipd_start() {
  10. _exists true || return 1
  11. eval args=\$autoipd_${IFVAR}
  12. ebegin "Starting avahi-autoipd"
  13. /usr/bin/avahi-autoipd --daemonize --syslog --wait ${args} "${IFACE}"
  14. eend "${?}" || return 1
  15. _show_address
  16. return 0
  17. }
  18. autoipd_stop() {
  19. /usr/bin/avahi-autoipd --check --syslog "${IFACE}" || return 0
  20. ebegin "Stopping avahi-autoipd"
  21. /usr/bin/avahi-autoipd --kill --syslog "${IFACE}"
  22. eend "${?}"
  23. }