Subject: Re: bin/7656: run kvm_mkdb at boot to fix dmesg error
To: NetBSD Kernel Technical Discussion List <tech-kern@NetBSD.ORG>
From: Greg A. Woods <woods@most.weird.com>
List: netbsd-bugs
Date: 05/29/1999 12:37:24
OK, so yes, personal aesthetics can get in the way of keeping the names
consistent, and though this isn't really an excuse it does suggest that
there might be something less than perfect about making such rules.
> Maybe something along the lines of the following is the best of both
> worlds:
>
> kernname=`sysctl booted_kernel`
> if [ ! -e "$kernname" ]; then
> kernname="/netbsd"
> fi
> kvm_mkdb $kernname
How about this (which should work even for architectures where
booted_kernel isn't, or cannot be, filled in; and which also suggests
that the existance of this sysctl variable should not be MD):
kernname=`sysctl kern.booted_kernel`
if [ ! -e "$kernname" -a -e "/netbsd" ] ; then
kernname="/netbsd"
fi
if [ -n "$kernname" ] ; then
kvm_mkdb $kernname
else
rm -f /var/db/kvm.db
: can anything useful be done here or just complain?
fi
--
Greg A. Woods
+1 416 218-0098 VE3TCP <gwoods@acm.org> <robohack!woods>
Planix, Inc. <woods@planix.com>; Secrets of the Weird <woods@weird.com>