rdate.init 417 B

123456789101112131415161718192021
  1. #!/bin/mksh
  2. #FWINIT 54
  3. # It’s important that this is lower than openntpd’s FWinit number
  4. . /etc/rc.conf
  5. case $1 in
  6. autostart|start|restart)
  7. if [[ $(ls -l /usr/sbin/rdate) != *ucb* ]]; then
  8. rm -f /usr/sbin/rdate
  9. ln -s ../ucb/rdate /usr/sbin/rdate
  10. fi
  11. [[ $rdate_flags = NO ]] && exit 0
  12. /usr/ucb/rdate $rdate_flags
  13. ;;
  14. autostop|stop)
  15. ;;
  16. *)
  17. echo "Usage: $0 {start | stop | restart}"
  18. exit 1
  19. ;;
  20. esac
  21. exit $?