diff --git a/etc/rc b/etc/rc index 68a02464f67e..439d577530b8 100644 --- a/etc/rc +++ b/etc/rc @@ -490,9 +490,12 @@ case ${dumpdev} in [Nn][Oo] | '') ;; *) - if [ -z "${dumpdir}" ]; then - dumpdir="/var/crash" - fi + case ${dumpdir} in + '') + dumpdir='/var/crash' + ;; + esac + if [ -e "${dumpdev}" -a -d "${dumpdir}" ]; then /sbin/dumpon -v ${dumpdev} echo -n 'Checking for core dump: '