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 12 name="sysdb" 13 start_cmd="sysdb_start" 14 stop_cmd=":" 15 16 sysdb_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 36 load_rc_config $name 37 run_rc_command "$1" 38