NetBSD/etc/rc.d/sysdb

35 lines
768 B
Plaintext
Raw Normal View History

2000-03-10 14:53:23 +03:00
#!/bin/sh
#
# $NetBSD: sysdb,v 1.8 2001/04/16 01:38:15 lukem Exp $
2000-03-10 14:53:23 +03:00
#
# PROVIDE: sysdb
# REQUIRE: mountcritremote
2000-03-10 14:53:23 +03: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`
kvm_mkdb "${booted_kernel:-/netbsd}"
2000-03-10 14:53:23 +03: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
2000-03-10 14:53:23 +03:00
}
load_rc_config $name
2000-03-10 14:53:23 +03:00
run_rc_command "$1"