Thu Jun 18 22:00:04 2009 UTC ()
now that pwd_mkdb does not change the version, warn if we still have version
0 databases.


(christos)
diff -r1.20 -r1.21 src/etc/rc.d/sysdb

cvs diff -r1.20 -r1.21 src/etc/rc.d/sysdb (expand / switch to unified diff)

--- src/etc/rc.d/sysdb 2007/08/26 23:55:50 1.20
+++ src/etc/rc.d/sysdb 2009/06/18 22:00:04 1.21
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# $NetBSD: sysdb,v 1.20 2007/08/26 23:55:50 dyoung Exp $ 3# $NetBSD: sysdb,v 1.21 2009/06/18 22:00:04 christos Exp $
4# 4#
5 5
6# PROVIDE: sysdb 6# PROVIDE: sysdb
7# REQUIRE: mountcritremote 7# REQUIRE: mountcritremote
8# BEFORE: DAEMON 8# BEFORE: DAEMON
9 9
10$_rc_subr_loaded . /etc/rc.subr 10$_rc_subr_loaded . /etc/rc.subr
11 11
12name="sysdb" 12name="sysdb"
13rcvar=$name 13rcvar=$name
14start_cmd="sysdb_start" 14start_cmd="sysdb_start"
15stop_cmd=":" 15stop_cmd=":"
16extra_commands="devdb utmp services netgroup password" 16extra_commands="devdb utmp services netgroup password"
@@ -58,27 +58,27 @@ build_services() @@ -58,27 +58,27 @@ build_services()
58build_netgroup() 58build_netgroup()
59{ 59{
60 check_file /etc/netgroup /var/db/netgroup.db netgroup_mkdb 60 check_file /etc/netgroup /var/db/netgroup.db netgroup_mkdb
61} 61}
62 62
63build_devdb() 63build_devdb()
64{ 64{
65 check_file /dev /var/run/dev.db dev_mkdb 65 check_file /dev /var/run/dev.db dev_mkdb
66} 66}
67 67
68build_password() 68build_password()
69{ 69{
70 local p=/etc/master.passwd 70 local p=/etc/master.passwd
71 check_file $p /etc/spwd.db pwd_mkdb $p 71 check_file $p /etc/spwd.db pwd_mkdb -w $p
72} 72}
73 73
74build_utmp() 74build_utmp()
75{ 75{
76 # Re-create /var/run/utmp and /var/run/utmpx, which are 76 # Re-create /var/run/utmp and /var/run/utmpx, which are
77 # deleted by mountcritlocal but can't be recreated by it 77 # deleted by mountcritlocal but can't be recreated by it
78 # because install and chown may not be available then 78 # because install and chown may not be available then
79 # (possibly no /usr). 79 # (possibly no /usr).
80 # 80 #
81 local i 81 local i
82 for i in "" x; do 82 for i in "" x; do
83 if [ ! -f /var/run/utmp$i ]; then 83 if [ ! -f /var/run/utmp$i ]; then
84 $echo -n "${comma}utmp$i" 84 $echo -n "${comma}utmp$i"