1 #!/bin/sh 2 # 3 # $NetBSD: sysdb,v 1.7 2000/10/14 07:33:39 nisimura Exp $ 4 # 5 6 # PROVIDE: sysdb 7 # REQUIRE: mountcritremote 8 9 . /etc/rc.subr 10 11 name="sysdb" 12 start_cmd="sysdb_start" 13 stop_cmd=":" 14 15 sysdb_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 33 load_rc_config $name 34 run_rc_command "$1" 35