sysdb revision 1.5
1#!/bin/sh 2# 3# $NetBSD: sysdb,v 1.5 2000/09/19 13:04:39 lukem Exp $ 4# 5 6# PROVIDE: sysdb 7# REQUIRE: mountcritremote 8 9. /etc/rc.subr 10 11name="sysdb" 12start_cmd="sysdb_start" 13stop_cmd=":" 14 15sysdb_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 sysctl machdep 2>/dev/null | grep -q booted_kernel 23 if [ $? -eq 0 ] ; then 24 kvm_mkdb `sysctl -n machdep.booted_kernel` || kvm_mkdb /netbsd 25 else 26 kvm_mkdb /netbsd 27 fi 28 dev_mkdb 29 30 # Re-create /var/run/utmp, which is deleted by mountcritlocal 31 # but can't be recreated by it because install and chown may 32 # not be available then (possibly no /usr). 33 # 34 install -c -m 664 -g utmp /dev/null /var/run/utmp 35} 36 37load_rc_config $name 38run_rc_command "$1" 39