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.
23 lines
465 B
23 lines
465 B
#!/bin/sh
|
|
|
|
. /etc/init.d/globals
|
|
|
|
case $1 in
|
|
start)
|
|
if [ -e /var/etc/.coredump ]; then
|
|
read dumpdir < /var/etc/.coredump
|
|
dumpdir=${dumpdir:-/tmp}
|
|
mkdir -p ${dumpdir}
|
|
|
|
# unlimit core file size
|
|
ulimit -c unlimited
|
|
# change default core pattern
|
|
echo "${dumpdir}/core.%e.%p.%t" > /proc/sys/kernel/core_pattern
|
|
|
|
SHOWINFO "coredumps stored in" $(cat /proc/sys/kernel/core_pattern)
|
|
fi
|
|
;;
|
|
*)
|
|
echo "[${BASENAME}] Usage: $0 {start}"
|
|
;;
|
|
esac
|
|
|