Advertisement
Guest User

Untitled

a guest
Aug 15th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. %pre -n ntpdate
  2. /usr/sbin/groupadd -g 38 ntp 2> /dev/null || :
  3. /usr/sbin/useradd -u 38 -g 38 -s /sbin/nologin -M -r -d %{_sysconfdir}/ntp ntp 2>/dev/null || :
  4.  
  5. %post
  6. /sbin/chkconfig --add ntpd
  7. :
  8.  
  9. %post -n ntpdate
  10. /sbin/chkconfig --add ntpdate
  11. :
  12.  
  13. %preun
  14. if [ "$1" -eq 0 ]; then
  15. /sbin/service ntpd stop &> /dev/null
  16. /sbin/chkconfig --del ntpd
  17. fi
  18. :
  19.  
  20. %preun -n ntpdate
  21. if [ "$1" -eq 0 ]; then
  22. /sbin/service ntpdate stop &> /dev/null
  23. /sbin/chkconfig --del ntpdate
  24. fi
  25. :
  26.  
  27. %postun
  28. if [ "$1" -ge 1 ]; then
  29. /sbin/service ntpd condrestart &> /dev/null
  30. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement