Re: automounter & NIS (auto.direct)

From: Alberto 'JCN-9000' Varesio (A-Varesio_at_eads.matradatavision.com)
Date: 06/30/03


Date: Mon, 30 Jun 2003 14:28:31 +0200

Uwe Ortner wrote:
> Hello,
>
> I have a defined group of workstations which should mount from the
> auto.direct map on the NIS master
> /symbol -rw,intr,noac,hard,timeo=60 sv001:/export/SYMBOL1
>
> all the rest should mount
> /symbol -rw,intr,noac,hard,timeo=60 sv001:/export/SYMBOL2
>
> On all workstations there should be just a single line in /etc/auto_direct
> like:
> +auto.direct
>
> How could this be managed via the NIS-Server map?

Looks like it's not that easy :(
You can't ask for a different map based on client's IP.

You could try to make /etc/auto_direct an 'Executable Map' so that
automount treats it like a script. There you can check for client's
hostname and return corresponding map line.
Working with ypmatch you can keep map lines inside a central map-file
and a little script-editing can accomplish the task.

   ypmatch symbol_1 auto.direct | sed -e 's/symbol_1/symbol'

-- 
  Alberto 'JCN-9000' Varesio     AKA  BlueRider   AIX pSeries System Admin
  EADS-MDTV - Via Goito 51/A    Riding the world  Jeeper on Black '01TJ4.0
  10195 Grugliasco (TO) ITALY    on HONDA CB500    Phone: +39-011-415-8148
  mailto:A-Varesio@eads.matradatavision.com    A-Varesio@eads.dnsalias.net
  Please http://www.fsf.org/philosophy/no-word-attachments.html, thanks!
-- 
  In shape, I'm in shape, round is a shape, NO?


Relevant Pages

  • Re: [autofs] [RFC] Towards a Modern Autofs
    ... >entangling autofs with that work. ... >filesystem it's willing to export. ... >>map is mounted. ... The result is that some users will see mount points ...
    (Linux-Kernel)
  • Re: [autofs] [RFC] Towards a Modern Autofs
    ... points in the autofs filesystem has always been hard and error prone. ... Is the plan a new kernel module or are we talking about ... My thoughts on map info and cacheing of it will come when I have had more ... every direct mount? ...
    (Linux-Kernel)
  • Re: [PATCH 3/4] autofs4 - track uid and gid of last mount requestor
    ... the lookup we set macros for several mount map substitution variables, ... I think there is some confusion surrounding what the UID and GID are ... it would be given the uid in the user namespace which autofs 'knows'. ...
    (Linux-Kernel)
  • Re: [autofs] [RFC] Towards a Modern Autofs
    ... not visibility in the automount map. ... > to mount it and no longer finds it in the map, ... if /usr/src/linux is an autofs direct ... Whereas if the subdir and containing dir are unmounted ...
    (Linux-Kernel)
  • Re: GPS impressions (and: I dropped it!)
    ... The map is its best feature. ... There are other display modes, but I mostly use the map. ... I tried a few bolt-on mounts before just gluing a mount plate to the triple clamp. ... The feature list I gave describes the Legend. ...
    (rec.motorcycles)