Date: Tue, 30 Nov 2010 16:04:40 +0000 (UTC) From: Colin Percival <cperciva@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r216077 - head/usr.sbin/crashinfo Message-ID: <201011301604.oAUG4edL008815@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cperciva Date: Tue Nov 30 16:04:40 2010 New Revision: 216077 URL: http://svn.freebsd.org/changeset/base/216077 Log: Teach crashinfo(8) to look at the currently running kernel (based on the kern.bootfile sysctl). Prior to this commit, crashinfo(8) only looks at /boot/*/kernel; this includes the usual places where kernels reside, so for most systems this will have no effect. Approved by: jhb MFC after: 3 days Modified: head/usr.sbin/crashinfo/crashinfo.sh Modified: head/usr.sbin/crashinfo/crashinfo.sh ============================================================================== --- head/usr.sbin/crashinfo/crashinfo.sh Tue Nov 30 16:00:59 2010 (r216076) +++ head/usr.sbin/crashinfo/crashinfo.sh Tue Nov 30 16:04:40 2010 (r216077) @@ -53,7 +53,7 @@ find_kernel() }' $INFO) # Look for a matching kernel version. - for k in /boot/kernel/kernel $(ls -t /boot/*/kernel); do + for k in `sysctl -n kern.bootfile` $(ls -t /boot/*/kernel); do kvers=$(echo 'printf " Version String: %s", version' | \ gdb -x /dev/stdin -batch $k 2>/dev/null) if [ "$ivers" = "$kvers" ]; then
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011301604.oAUG4edL008815>