You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
747 B

  1. #!/bin/sh
  2. #
  3. # This is NOT the init script! This is the watchfrr start/stop/restart
  4. # command handler, passed to watchfrr with the -s/-r/-k commands. It is used
  5. # internally by watchfrr to start the protocol daemons with the appropriate
  6. # options.
  7. #
  8. # This script should be installed in /usr/sbin/watchfrr.sh
  9. log_success_msg() {
  10. :
  11. }
  12. log_warning_msg() {
  13. echo "$@" >&2
  14. [ -x /usr/bin/logger ] && echo "$@" \
  15. | /usr/bin/logger -t watchfrr.sh -p daemon.warn
  16. }
  17. log_failure_msg() {
  18. echo "$@" >&2
  19. [ -x /usr/bin/logger ] && echo "$@" \
  20. | /usr/bin/logger -t watchfrr.sh -p daemon.err
  21. }
  22. self="`dirname $0`"
  23. if [ -r "$self/frrcommon.sh" ]; then
  24. . "$self/frrcommon.sh"
  25. else
  26. . "/usr/sbin/frrcommon.sh"
  27. fi
  28. chownfrr $V_PATH
  29. frrcommon_main "$@"