diff options
author | cperciva <cperciva@FreeBSD.org> | 2010-11-30 16:04:40 +0000 |
---|---|---|
committer | cperciva <cperciva@FreeBSD.org> | 2010-11-30 16:04:40 +0000 |
commit | f3bd80afa1c8697faae1168f9d9c3573c41865ca (patch) | |
tree | fcfae37fdfcb71fcf5a59e5d199d3638861892d1 /usr.sbin/crashinfo | |
parent | 7314841aaa5f42f82f315c02fb9751bdd11d40e9 (diff) | |
download | FreeBSD-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')
-rwxr-xr-x | usr.sbin/crashinfo/crashinfo.sh | 2 |
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 |