2001-06-16 07:16:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2002-06-13 22:14:37 +00:00
|
|
|
# $NetBSD: sysdb,v 1.9 2002/03/22 04:34:00 thorpej Exp $
|
|
|
|
# $FreeBSD$
|
2001-06-16 07:16:14 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# PROVIDE: sysdb
|
|
|
|
# REQUIRE: mountcritremote
|
2002-06-13 22:14:37 +00:00
|
|
|
# BEFORE: DAEMON
|
2001-06-16 07:16:14 +00:00
|
|
|
|
|
|
|
. /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..."
|
|
|
|
booted_kernel=`sysctl -n machdep.booted_kernel 2>/dev/null`
|
2002-06-13 22:14:37 +00:00
|
|
|
kvm_mkdb "${booted_kernel:-/netbsd}"
|
2001-06-16 07:16:14 +00:00
|
|
|
dev_mkdb
|
|
|
|
|
|
|
|
# Re-create /var/run/utmp, which is deleted by mountcritlocal
|
|
|
|
# but can't be recreated by it because install and chown may
|
|
|
|
# not be available then (possibly no /usr).
|
|
|
|
#
|
|
|
|
install -c -m 664 -g utmp /dev/null /var/run/utmp
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|