summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crashinfo/crashinfo.sh
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2010-11-30 16:04:40 +0000
committercperciva <cperciva@FreeBSD.org>2010-11-30 16:04:40 +0000
commitf3bd80afa1c8697faae1168f9d9c3573c41865ca (patch)
treefcfae37fdfcb71fcf5a59e5d199d3638861892d1 /usr.sbin/crashinfo/crashinfo.sh
parent7314841aaa5f42f82f315c02fb9751bdd11d40e9 (diff)
downloadFreeBSD-src-f3bd80afa1c8697faae1168f9d9c3573c41865ca.zip
FreeBSD-src-f3bd80afa1c8697faae1168f9d9c3573c41865ca.tar.gz
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
Diffstat (limited to 'usr.sbin/crashinfo/crashinfo.sh')
-rwxr-xr-xusr.sbin/crashinfo/crashinfo.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh
index 60f0360..89013a2 100755
--- a/usr.sbin/crashinfo/crashinfo.sh
+++ b/usr.sbin/crashinfo/crashinfo.sh
@@ -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
OpenPOWER on IntegriCloud