Date: Sat, 5 Sep 2009 18:44:36 +0000 (UTC) From: Craig Rodrigues <rodrigc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r196870 - stable/7/etc/rc.d Message-ID: <200909051844.n85IiaNs061373@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rodrigc Date: Sat Sep 5 18:44:36 2009 New Revision: 196870 URL: http://svn.freebsd.org/changeset/base/196870 Log: This set of MFC's brings savecore closer to the trunk version. Now, crashinfo will only be run if the following conditions are true: - savecore -C determines that a crash dump exists - crashinfo_enable="YES" MFC: 182460 Add the ability to run /usr/sbin/crashinfo on a new core dump automatically during boot. MFC: 180318 Remove the $DUMPDIR variable. It's redundant and the rest of the script uses $dumpdir directly. MFC: 180317 Make checking for the availability of core dumps work in the case that $dumpdev is not set to "AUTO". Modified: stable/7/etc/rc.d/savecore Modified: stable/7/etc/rc.d/savecore ============================================================================== --- stable/7/etc/rc.d/savecore Sat Sep 5 17:40:27 2009 (r196869) +++ stable/7/etc/rc.d/savecore Sat Sep 5 18:44:36 2009 (r196870) @@ -52,10 +52,25 @@ savecore_prestart() savecore_start() { + local dev + + case "${dumpdev}" in + [Aa][Uu][Tt][Oo]) + dev= + ;; + *) + dev="${dumpdev}" + ;; + esac + echo "Checking for core dump on ${dumpdev}..." - savecore ${savecore_flags} ${dumpdir} ${dumpdev} - if checkyesno crashinfo_enable; then - ${crashinfo_program} -d ${dumpdir} + if savecore -C "${dumpdir}" "${dev}" >/dev/null; then + savecore ${savecore_flags} ${dumpdir} ${dumpdev} + if checkyesno crashinfo_enable; then + ${crashinfo_program} -d ${dumpdir} + fi + else + [ -z "${rc_quiet}" ] && echo "No core dumps found" fi }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909051844.n85IiaNs061373>