Thanks for the info. Implemented it, and I am now happy. So far,
everything just works!
Thanks for the help.
On (19/03/02 12:32), Jochen Reinwand wrote:
> From: Jochen Reinwand <[EMAIL PROTECTED]>
> To: Rune Mossige <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED]
> Subject: Re: Overriding entries in a map
> Date: Tue, 19 Mar 2002 12:32:23 +0100
> Content-Transfer-Encoding: 8bit
> Content-Length: 3412
> Lines: 100
>
> Hi
>
> executable maps are handled like normal maps. Just put them in auto.master.
> The only thing you have to care about is that it is executable. The rc script
> will then automatically interpret it as executable map.
> So put the script in /etc/auto_app.sh and make it executable. Now you should
> insert a line in auto.master:
>
> /app /etc/auto_app.sh <options>
>
> This way it should work.
> I'm not really firm with using NIS with autofs. I take the map from NIS, but
> this is done via ypmatch in the executable map.
>
> Hope that helped you a bit. For further information just ask or look at the
> man pages. You should find enough info there.
>
> Jochen
>
> On Monday, 18. March 2002 14:34, Rune Mossige wrote:
> > 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