Run savecore(8) only if there is a core dump to save. If there is

no core dump hide the message to that effect behind $rc_quiet.
This commit is contained in:
mtm 2008-06-23 20:54:32 +00:00
parent ebef621a5c
commit 0203c01701

View File

@ -57,8 +57,11 @@ savecore_prestart()
savecore_start()
{
[ -z "${rc_quiet}" ] && echo "Checking for core dump on ${dumpdev}..."
savecore ${savecore_flags} ${DUMPDIR} ${dumpdev}
if savecore -C >/dev/null; then
savecore ${savecore_flags} ${DUMPDIR} ${dumpdev}
else
[ -z "${rc_quiet}" ] && echo "No core dumps found"
fi
}
load_rc_config $name