NetBSD/etc/rc.d/sysdb

33 lines
611 B
Plaintext
Raw Normal View History

2000-03-10 14:53:23 +03:00
#!/bin/sh
#
# $NetBSD: sysdb,v 1.2 2000/05/13 08:45:09 lukem Exp $
2000-03-10 14:53:23 +03:00
#
# PROVIDE: databases
# REQUIRE: systemfs
. /etc/rc.subr
name="sysdb"
start_cmd="sysdb_start"
stop_cmd=":"
sysdb_start()
{
# Build ps databases. If this kernel supports
# machdep.booted_kernel, use that to build the KVM db so dmesg
# will run work when we boot /netbsd.new, etc.
#
echo "Building databases..."
sysctl machdep 2>/dev/null | grep -q booted_kernel
if [ $? -eq 0 ] ; then
kvm_mkdb `sysctl -n machdep.booted_kernel` || kvm_mkdb /netbsd
else
kvm_mkdb /netbsd
fi
dev_mkdb
}
load_rc_config $name
2000-03-10 14:53:23 +03:00
run_rc_command "$1"