1830060 Members
2743 Online
109998 Solutions
New Discussion

Linux autofs question

 
Brian Kennedy
Occasional Advisor

Linux autofs question

Hi admins:

Here is an excerpt of my /etc/auto.master file:

--snip--
/tools yp:auto_tools --fstype=autofs,-DNFS_SERVER=hpnfs001
--snip--

And here is auto_tools:
--snip--
* ${NFS_SERVER}:/tools/${OSNAME}/${OSREL}/&
--snip--

This config does not work, as the variable NFS_SERVER is not expanded.

My question is: how can I define a variable (as with HP-Ux and AUTOMOUNTD_OPTIONS) that can be used within map files?

Any workaround?

Thanks for help!

Cheers.

/Brian
1 REPLY 1
Stuart Browne
Honored Contributor

Re: Linux autofs question

Well, I did some tests on a RH 7.3 box, and this is what I've seen work:

--snip: /etc/auto.master--
/tmp/blah /etc/auto.tmp -DMACHINE=notes
--snip--

--snip: /etc/auto.tmp--
* -fstype=nfs ${MACHINE}:/var/local/shares
--snip--

This worked succesfully.

What version of the Auto-mounter, what kernel, what OS ?

Try without the '--fstype=autofs,' part, and see if the problem also continues (it's obviously NFS, and MOUNT should be intelligent enough to recognise that).
One long-haired git at your service...