sysctl 896 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/sh
  2. # Begin /etc/init.d/sysctl
  3. ### BEGIN INIT INFO
  4. # Provides: sysctl
  5. # Required-Start: mountkernfs
  6. # Should-Start:
  7. # Required-Stop:
  8. # Should-Stop:
  9. # Default-Start: S
  10. # Default-Stop:
  11. # Short-Description: Makes changes to the proc filesystem
  12. # Description: Makes changes to the proc filesystem as defined in
  13. # /etc/sysctl.conf. See 'man sysctl(8)'.
  14. # X-LFS-Default-Start: S05
  15. # X-LFS-Default-Stop:
  16. # X-LFS-Provided-By: LFS
  17. ### END INIT INFO
  18. . /lib/lsb/init-functions
  19. case "${1}" in
  20. start)
  21. if [ -f "/etc/sysctl.conf" ]; then
  22. message="Setting kernel runtime parameters..."
  23. sysctl -q -p
  24. evaluate_retval standard
  25. fi
  26. ;;
  27. status)
  28. sysctl -a
  29. ;;
  30. *)
  31. echo "Usage: ${0} {start|status}"
  32. exit 1
  33. ;;
  34. esac
  35. # End /etc/init.d/sysctl