From f3bd80afa1c8697faae1168f9d9c3573c41865ca Mon Sep 17 00:00:00 2001 From: cperciva Date: Tue, 30 Nov 2010 16:04:40 +0000 Subject: [PATCH] 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 --- usr.sbin/crashinfo/crashinfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/crashinfo/crashinfo.sh b/usr.sbin/crashinfo/crashinfo.sh index 60f036014c4..89013a27f64 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 -- 2.45.2