sysctl 855 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. # Begin $RC_BASE/init.d/sysctl
  3. ### BEGIN INIT INFO
  4. # Provides: sysctl
  5. # Required-Start: mountvirtfs
  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-Provided-By: LFS
  15. ### END INIT INFO
  16. . /lib/lsb/init-functions
  17. case "${1}" in
  18. start)
  19. if [ -f "/etc/sysctl.conf" ]; then
  20. message="Setting kernel runtime parameters..."
  21. sysctl -q -p
  22. evaluate_retval standard
  23. fi
  24. ;;
  25. status)
  26. sysctl -a
  27. ;;
  28. *)
  29. echo "Usage: ${0} {start|status}"
  30. exit 1
  31. ;;
  32. esac
  33. # End $RC_BASE/init.d/sysctl