isisd.init 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #!/bin/bash
  2. #
  3. # chkconfig: 2345 16 84
  4. # description: An ISIS routing engine for use with Quagga
  5. #
  6. # processname: isisd
  7. # config: /etc/quagga/isisd.conf
  8. # source function library
  9. . /etc/rc.d/init.d/functions
  10. # Get network config
  11. . /etc/sysconfig/network
  12. # Check that networking is up.
  13. [ "${NETWORKING}" = "no" ] && exit 0
  14. # The process must be configured first.
  15. [ -f /etc/quagga/isisd.conf ] || exit 0
  16. RETVAL=0
  17. prog="isisd"
  18. case "$1" in
  19. start)
  20. echo -n $"Starting $prog: "
  21. daemon /usr/sbin/isisd -d
  22. RETVAL=$?
  23. [ $RETVAL -eq 0 ] && touch /var/lock/subsys/isisd
  24. echo
  25. ;;
  26. stop)
  27. echo -n $"Shutting down $prog: "
  28. killproc isisd
  29. RETVAL=$?
  30. [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/isisd
  31. echo
  32. ;;
  33. restart|reload)
  34. $0 stop
  35. $0 start
  36. RETVAL=$?
  37. ;;
  38. condrestart)
  39. if [ -f /var/lock/subsys/isisd ]; then
  40. $0 stop
  41. $0 start
  42. fi
  43. RETVAL=$?
  44. ;;
  45. status)
  46. status isisd
  47. RETVAL=$?
  48. ;;
  49. *)
  50. echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
  51. exit 1
  52. esac
  53. exit $RETVAL