quota.rc7 688 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2012 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License, v2
  4. extra_started_commands="check"
  5. description_check="Running quotacheck with quota being offline"
  6. depend() {
  7. need localmount
  8. use portmap
  9. }
  10. start() {
  11. if [ "${RUN_QUOTACHECK}" = "yes" ] ; then
  12. ebegin "Checking quotas (may take a while)"
  13. quotacheck ${QUOTACHECK_OPTS}
  14. eend $?
  15. fi
  16. ebegin "Starting quota"
  17. quotaon ${QUOTAON_OPTS}
  18. eend $?
  19. }
  20. stop() {
  21. ebegin "Stopping quota"
  22. quotaoff ${QUOTAOFF_OPTS}
  23. eend $?
  24. }
  25. check() {
  26. ebegin "Checking quota"
  27. quotaoff ${QUOTAOFF_OPTS} && \
  28. quotacheck ${QUOTACHECK_OPTS} && \
  29. quotaon ${QUOTAON_OPTS}
  30. eend $?
  31. }