core/src/etc/rc.crashdump
2015-04-30 08:08:08 +02:00

21 lines
412 B
Bash
Executable File

#!/bin/sh
echo -n "Configuring crash dump device: "
while read DEV MP TYPE MORE; do
[ "${TYPE}" = "swap" ] || continue
[ -c "${DEV}" ] || continue
if dumpon ${DEV}; then
echo ${DEV}
if [ -n "`sysctl -Nq debug.ddb.scripting.scripts`" ]; then
ddb /usr/local/etc/ddb.conf
fi
if savecore -C ${DEV} > /dev/null; then
savecore /var/crash ${DEV}
fi
exit 0
fi
done < /etc/fstab
echo "/dev/null"