Jochen,
I have reviewed my previous solution, and found that I liked Your way
better....

Could You please give me an example of how this executable map gets
implemented into the local /etc/auto.master file, and NIS etc?

I am not familiar with executable maps at all, so any pointers would
help.

On (12/03/02 14:22), Jochen Reinwand wrote:
> From: Jochen Reinwand <[EMAIL PROTECTED]>
> To: Rune Mossige <[EMAIL PROTECTED]>,
>         [EMAIL PROTECTED]
> Subject: Re: Overriding entries in a map
> Date: Tue, 12 Mar 2002 14:22:02 +0100
> Content-Transfer-Encoding: 8bit
> Sender: [EMAIL PROTECTED]
> Status: RO
> Content-Length: 1771
> Lines: 58
> 
> Hi!
> 
> We have nearly the same situation you described.
> We solved the problem by using an executable map. You can write a small C 
> program or shell script that filters the yp maps.
> 
> A basic sh script:
> 
> ---------------------------------------------------------------------
> #!/bin/sh
> key=$1  # first parameter is directory the user requested
> 
> # Now we assume our local directory could be found in /app.local
> if [ -d "/app.local/$key" ] then
>     # automount wants the result on stdout
>     echo "localhost:/app.local/$key"
>     exit 0
> else
>     # No local dir -> we use data from NIS
>     ypmatch $key auto_app 2> /dev/null
>     exit $?
> fi
> ---------------------------------------------------------------------
> 
> The example just shows the basic idea. We build up a very complex and 
> powerful software distribution mechanism on this idea. It would be to 
> complicated to explain it here in the mail in detail.
> Perhaps we will put the whole thing online as a project someday...
> 
> Jochen
> 
> On Tuesday, 12. March 2002 11:06, Rune Mossige wrote:
> > Hello,
> > I am running multiple RedHat 7.2 clients, with kernel 2.4.18, using the
> > stock RedHat autofs (3.1.7), with multiple maps served by NIS, from a
> > Solaris host.
> >
> > On some of these clients, we would like to make a local override, in
> > order to sort of cache a filesystem locally...
> >
> > Basically, replicate what can be done under Solaris8, with these sample
> > files:
> >
> > cat auto_master
> > # Master map for automounter
> > #
> > /app            /etc/auto_app   -rw,intr,hard
> > +auto_master
> >
> >
> > cat /etc/auto_app
> > omega           GSTV02:/Agstv0201/app/omega
> > +auto_app
> >
> > Basically, in the NIS map auto_app we want to override one single entry,
> > omega, and mount that one from a local filesystem on the client.
> >
> > Can that be done?

-- 
-------------------------------------------------------------------
           (-: Hiroshima 45, Chernobyl 86, Windows 95 :-)
Our ultimate goal is to make overloaded systems appear to be idle.
High performance, High reliability, Low cost -------- Pick any two.
-------------------------------------------------------------------
Rune  Mossige,  Systems  Support  Engineer,  WesternGeco, Stavanger
Tel: (+47)51946869                             Mobile:(+47)90871024

Reply via email to