3 # $NetBSD: sysdb,v 1.24 2012/06/03 21:42:45 joerg Exp $
7 # REQUIRE: mountcritremote
10 $_rc_subr_loaded .
/etc
/rc.subr
14 start_cmd
="sysdb_start"
16 extra_commands
="devdb utmp services netgroup password"
17 devdb_cmd
="build_devdb"
19 services_cmd
="build_services"
20 netgroup_cmd
="build_netgroup"
21 password_cmd
="build_password"
26 echo -n "Building databases:"
43 if [ ! -e "$src" ]; then
46 if [ \
( ! -f "$db" \
) -o \
( "$src" -nt "$db" \
) ]; then
47 $echo -n "$comma$(basename "$src")"
55 check_file
/etc
/services
/var
/db
/services.cdb services_mkdb
-q
60 check_file
/etc
/netgroup
/var
/db
/netgroup.db netgroup_mkdb
65 check_file
/dev
/var
/run
/dev.db dev_mkdb
66 check_file
/dev
/var
/run
/dev.cdb dev_mkdb
71 local p
=/etc
/master.passwd
72 check_file
$p /etc
/spwd.db pwd_mkdb
-w $p
77 # Re-create /var/run/utmp and /var/run/utmpx, which are
78 # deleted by mountcritlocal but can't be recreated by it
79 # because install and chown may not be available then
84 if [ ! -f /var
/run
/utmp
$i ]; then
85 $echo -n "${comma}utmp$i"
87 install -c -m 664 -g utmp
/dev
/null
/var
/run
/utmp
$i