sysdb revision 1.9
1#!/bin/sh
2#
3# $NetBSD: sysdb,v 1.9 2002/03/22 04:34:00 thorpej Exp $
4#
5
6# PROVIDE: sysdb
7# REQUIRE: mountcritremote
8# BEFORE:  DAEMON
9
10. /etc/rc.subr
11
12name="sysdb"
13start_cmd="sysdb_start"
14stop_cmd=":"
15
16sysdb_start()
17{
18	#	Build ps databases. If this kernel supports
19	#	machdep.booted_kernel, use that to build the KVM db so dmesg
20	#	will run work when we boot /netbsd.new, etc.
21	#
22	echo "Building databases..."
23	booted_kernel=`sysctl -n machdep.booted_kernel 2>/dev/null`
24	kvm_mkdb "${booted_kernel:-/netbsd}"
25	dev_mkdb
26
27	#	Re-create /var/run/utmp, which is deleted by mountcritlocal
28	#	but can't be recreated by it because install and chown may
29	#	not be available then (possibly no /usr).
30	#
31	install -c -m 664 -g utmp /dev/null /var/run/utmp
32}
33
34load_rc_config $name
35run_rc_command "$1"
36