sysdb revision 1.3
1#!/bin/sh
2#
3# $NetBSD: sysdb,v 1.3 2000/07/26 00:11:49 lukem Exp $
4#
5
6# PROVIDE: databases
7# REQUIRE: mountcritremote
8
9. /etc/rc.subr
10
11name="sysdb"
12start_cmd="sysdb_start"
13stop_cmd=":"
14
15sysdb_start()
16{
17	#	Build ps databases. If this kernel supports
18	#	machdep.booted_kernel, use that to build the KVM db so dmesg
19	#	will run work when we boot /netbsd.new, etc.
20	#
21	echo "Building databases..."
22	sysctl machdep 2>/dev/null | grep -q booted_kernel
23	if [ $? -eq 0 ] ; then
24		kvm_mkdb `sysctl -n machdep.booted_kernel` || kvm_mkdb /netbsd
25	else
26		kvm_mkdb /netbsd
27	fi
28	dev_mkdb
29}
30
31load_rc_config $name
32run_rc_command "$1"
33