July 29, 1997


Motivation

Nanny provides a way to use system services without having to worry about manually loading them or without having to load everything from boot.

Overview

The nanny provides a demand-loading service for objects, such as domains and devices. For each named entity implemented by a dynamically linked server, nanny watches for references to the entity and executes a script associated with the name before the lookup is allowed to complete.

Nanny is an extension that is generally loaded at system boot time.

Using Nanny

Nanny can be used from the shell and directly from programs. Both interfaces are described in the interface file. We'll only describe the shell interface here.
nanny install [-f] [-n alias] [name] script
will execute "script" whenever anyone goes to lookup "name" in the name service.

If the "name" is already present in the name space, nanny does nothing, unless the -f option is given. With -f, nanny reinstalls the name.

-n option is used to set the alias used in nanny touch. Without this option, the alias defaults to the last component of name. For example,

nanny install /../svc/domains/Sphinx $USER/sphinx/$target/sphinx.rc
     
is same as the below.
nanny install -n Sphinx /../svc/domains/Sphinx $USER/sphinx/$target/sphinx.rc
     
nanny delete name
removes name from nanny's purview.
nanny touch alias
forces nanny to query the alias (registered by install).
nanny zap
deinstall the current incarnation of nanny. (hackville USA)

An example

Here's an example that shows how to demand-load CAM whenever anyone tries to mount a disk.
nanny install /../svc/fs/ufs $USER/fs/ufs/$target/ufs.rc
nanny install /../svc/domains/Sieg $USER/sieg/$target/sieg.rc
This says:

Nanny Internals

Nanny creates the directory /../svc/nanny to store aliases.


bershad@cs.washington.edu
Nanny