sysdb revision 1.8
1#!/bin/sh
2#
3# $NetBSD: sysdb,v 1.8 2001/04/16 01:38:15 lukem Exp $
4#
5
6# PROVIDE: sysdb
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	booted_kernel=`sysctl -n machdep.booted_kernel 2>/dev/null`
23	kvm_mkdb "${booted_kernel:-/netbsd}"
24	dev_mkdb
25
26	#	Re-create /var/run/utmp, which is deleted by mountcritlocal
27	#	but can't be recreated by it because install and chown may
28	#	not be available then (possibly no /usr).
29	#
30	install -c -m 664 -g utmp /dev/null /var/run/utmp
31}
32
33load_rc_config $name
34run_rc_command "$1"
35