Subject: Querying an userland program from the kernel
To: None <>
From: Matthias Scheler <>
List: tech-kern
Date: 01/25/2004 02:39:12

I'm thinking about writing a better automounter for NetBSD (which above
all doesn't use softlinks but direct mounts). One of the conceptual
problems is getting the parameters for a mount (e.g. remote machine
and filesystem name for an NFS mount) from the kernel. Preloading the
automount table would possible but clumsy(*). I'm therefore searching
for a method to query an userland program from the kernel synchronously.
Is there already an example somewhere in NetBSD's kernel sources? If not
does anybody have an idea how to do this?

	Kind regards

(*) IIUC the startup scripts of Red Hat/SuSE correctly Linux's autofs
    needs to know all mount parameters in advance. So in case of NIS they
    fetch the whole map with "ypcat" and preload it. As a result automouter
    map changes need manual reload to get effective.

Matthias Scheler