Make checking for the availability of core dumps work in the case

that $dumpdev is not set to "AUTO".

Reported by: Paul B. Mahol <onemda@gmail.com>
This commit is contained in:
mtm 2008-07-06 07:51:29 +00:00
parent 14e606cf26
commit e28d296d11

View File

@ -57,7 +57,18 @@ savecore_prestart()
savecore_start()
{
if savecore -C >/dev/null; then
local dev
case "${dumpdev}" in
[Aa][Uu][Tt][Oo])
dev=
;;
*)
dev="${dumpdev}"
;;
esac
if savecore -C "${dumpdir}" "${dev}" >/dev/null; then
savecore ${savecore_flags} ${DUMPDIR} ${dumpdev}
else
[ -z "${rc_quiet}" ] && echo "No core dumps found"