sysctl 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/sh
  2. ########################################################################
  3. # Begin sysctl
  4. #
  5. # Description : File uses /etc/sysctl.conf to set kernel runtime
  6. # parameters
  7. #
  8. # Authors : Nathan Coulson (nathan@linuxfromscratch.org)
  9. # Matthew Burgress (matthew@linuxfromscratch.org)
  10. # DJ Lucas - dj@linuxfromscratch.org
  11. # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
  12. #
  13. # Version : LFS 7.0
  14. #
  15. ########################################################################
  16. ### BEGIN INIT INFO
  17. # Provides: sysctl
  18. # Required-Start: mountvirtfs
  19. # Should-Start:
  20. # Required-Stop:
  21. # Should-Stop:
  22. # Default-Start: S
  23. # Default-Stop:
  24. # Short-Description: Makes changes to the proc filesystem
  25. # Description: Makes changes to the proc filesystem as defined in
  26. # /etc/sysctl.conf. See 'man sysctl(8)'.
  27. # X-LFS-Provided-By: LFS
  28. ### END INIT INFO
  29. . /lib/lsb/init-functions
  30. case "${1}" in
  31. start)
  32. if [ -f "/etc/sysctl.conf" ]; then
  33. log_info_msg "Setting kernel runtime parameters..."
  34. sysctl -q -p
  35. evaluate_retval
  36. fi
  37. ;;
  38. status)
  39. sysctl -a
  40. ;;
  41. *)
  42. echo "Usage: ${0} {start|status}"
  43. exit 1
  44. ;;
  45. esac
  46. exit 0
  47. # End sysctl