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