sysctl 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. # Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
  11. #
  12. # Version : LFS 7.0
  13. #
  14. ########################################################################
  15. ### BEGIN INIT INFO
  16. # Provides: sysctl
  17. # Required-Start: mountkernfs
  18. # Should-Start:
  19. # Required-Stop:
  20. # Should-Stop:
  21. # Default-Start: S
  22. # Default-Stop:
  23. # Short-Description: Makes changes to the proc filesystem
  24. # Description: Makes changes to the proc filesystem as defined in
  25. # /etc/sysctl.conf. See 'man sysctl(8)'.
  26. # X-LFS-Provided-By: LFS
  27. ### END INIT INFO
  28. . /lib/boot/functions
  29. case "${1}" in
  30. start)
  31. if [ -f "/etc/sysctl.conf" ]; then
  32. boot_mesg "Setting kernel runtime parameters..."
  33. sysctl -q -p
  34. evaluate_retval
  35. fi
  36. ;;
  37. status)
  38. sysctl -a
  39. ;;
  40. *)
  41. echo "Usage: ${0} {start|status}"
  42. exit 1
  43. ;;
  44. esac
  45. # End sysctl