Subject: Re: The smallest multi-user system
To: Brian Rose <lists@brianrose.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-users
Date: 08/14/2003 12:14:34
On Thu, 14 Aug 2003, Brian Rose wrote:

> > Or another idea: If I am reading the code correctly, if dbopen can't
> > create a temporary database (maybe because filesystem not writable), then
> > it fails to get to the getty step. The code uses dbopen(NULL, ...). I
> > don't know if this temporary database is in memory or disk.
> >
> Is this in init or another program?

In /usr/src/sbin/init/init.c:

        if ((session_db = dbopen(NULL, O_RDWR, 0, DB_HASH, NULL)) == 0) {
                emergency("session database open: %m");
                return (1);
        }

(Then when that "start_session_db()" fails, init does the single_user
instead of multi_user.)

Again, I don't know if dbopen(NULL, ...) uses memory or disk for the
temporary database. But now, I think I am wrong, because looking at
src/lib/libc/db/hash/hash.c doesn't indicate any opening of files with it
is NULL.

   Jeremy C. Reed
   http://bsd.reedmedia.net/