S09coredump 538 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:
  4. # Short-Description: Disable coredump
  5. # Description: Disable dumpload and disable kernel coredump support
  6. ### END INIT INFO
  7. . /opt/wz_mini/etc/rc.common
  8. core() {
  9. wait_for_wlan_wpa $(basename "$0")
  10. echo "#####$(basename "$0")#####"
  11. echo "Killing dumpload"
  12. /opt/wz_mini/bin/busybox pkill -f dumpload
  13. echo "Setting kernel core pattern"
  14. sysctl -w kernel.core_pattern='|/bin/false' > /dev/null
  15. }
  16. case "$1" in
  17. start)
  18. core &
  19. ;;
  20. *)
  21. echo "Usage: $0 {start}"
  22. exit 1
  23. ;;
  24. esac