1#!/bin/sh 2# 3# $NetBSD: sysdb,v 1.10 2002/09/16 02:23:31 perry 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 and /var/run/utmpx, which are 28 # deleted by mountcritlocal but can't be recreated by it 29 # because install and chown may not be available then 30 # (possibly no /usr). 31 # 32 install -c -m 664 -g utmp /dev/null /var/run/utmp 33 install -c -m 664 -g utmp /dev/null /var/run/utmpx 34} 35 36load_rc_config $name 37run_rc_command "$1" 38