You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
465 B
24 lines
465 B
7 years ago
|
#!/bin/sh
|
||
|
|
||
|
. /etc/init.d/globals
|
||
|
|
||
|
case $1 in
|
||
|
start)
|
||
|
if [ -e /var/etc/.coredump ]; then
|
||
|
read dumpdir < /var/etc/.coredump
|
||
4 years ago
|
dumpdir=${dumpdir:-/tmp}
|
||
|
mkdir -p ${dumpdir}
|
||
|
|
||
|
# unlimit core file size
|
||
6 years ago
|
ulimit -c unlimited
|
||
4 years ago
|
# change default core pattern
|
||
|
echo "${dumpdir}/core.%e.%p.%t" > /proc/sys/kernel/core_pattern
|
||
7 years ago
|
|
||
4 years ago
|
SHOWINFO "coredumps stored in" $(cat /proc/sys/kernel/core_pattern)
|
||
|
fi
|
||
7 years ago
|
;;
|
||
|
*)
|
||
|
echo "[${BASENAME}] Usage: $0 {start}"
|
||
|
;;
|
||
|
esac
|