running pwd_mkdb from the startup scripts ?

From: Luigi Rizzo <rizzo_at_icir.org>
Date: Mon, 26 Apr 2004 09:43:31 -0700
does anyone know what is a good place to run /usr/sbin/pwd_mkdb
from the startup scripts ? Alternatively, can I put a hook
in /etc/rc to run it if so specified by rc.conf ?
(i am interested in doing that for diskless environments, but the 
problem is general).

A good place i have seen is at the end of rc.diskless2 (or the
equivalent in -current), or at the beginning of rc.sysctl,
but that requires to override the entire file just to add one line.
 
Starting from rc.local or local_startup scripts is too late
because some daemons need a valid user database to work;
starting from /etc/rc.early is too early because /usr is not
mounted yet.
  
The problem is, if the [s]pwd.db and [master.]passwd files
are out of sync, the system trusts the binary version and not
the one-true-source which would be master.passwd, so in
certain cases it would be nice to have them resynced automatically
at boot time

        cheers
        luigi
Received on Mon Apr 26 2004 - 07:43:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:52 UTC