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?