SUMMARY: automounter environment variables

From: pixels!
Date: Mon Sep 23 1991 - 19:08:36 CDT

My orignal questions was:

>> Does anyone know if the expansion of environment variables works
>> with automount. No matter what I try, I can not get automount to
>> expand environment variables. Whether I pass them in on the command
>> line with the -D option, or set them in the environment automount
>> refuses to expand them in either /etc/auto.master or the NIS version
>> of /etc/auto.master.
>> The sequence I use to start automount is as follows:
>> OS=SunOS.4.1.1
>> ARCH=`arch`
>> export OS ARCH
>> #
>> # Either of these two invocations of automount fail
>> #
>> automount -v -T -D OS=SunOS.4.1.1 -D ARCH=`arch` -f /etc/auto.master
>> #
>> # - OR -
>> #
>> automount -v -T -f /etc/auto.master
>> My /etc/auto.master looks like:
>> ------ Start /etc/auto.master ----------
>> #Mount-point Map Mount-options
>> /u auto.u.indirect -ro,intr
>> /- -ro,intr
>> /usr/depot auto.depot.$ARCH
>> /net -hosts
>> ------ End /etc/auto.master ----------
>> I get the following error from automount on the console:
>> Sep 18 09:07:13 badger automount[246]: auto.depot.$ARCH: Not found
>> I would think that that error message should be expanded to auto.depot.sun4.
>> The map for auto.depot.sun4 does exist.
>> If someone could tell me if it works, and if it does work how to use it I
>> would be very thankful. I have RTM, Chapter 15, "Using the NFS Automounter"
>> and the manual pages, but I still can not get this to work. This is
>> on a Sun 4, running SunOS 4.1.1.
>I sent out the following message this morning. I have received several
>replies stating that it does work. Upon checking, all of the answers
>which said that it works, were using environment variables in either a
>direct map or and indirect map, but not the master map. I have given
>it a try using environment variables, and they work in both indirect
>and direct map. I still can not get it to work in a master map. Even
>if I use braces around the environment variable to delimit the name from
>appended letters or digits it make no difference. So I will restate
>my question;
> Has anyone gotten environment variables to work their master map?

It appears that automount does NOT expand environment variables in the
master map. Automount will expand environment variables in any leaf map.
I wonder if this is a bug or a feature. Anyway, almost all of the responses
said that it worked, but everyone was using it in a leaf map not the master
map. I have gotten environment variables to work in any place expect the
key, in any leaf map. It does not work in the master map. One person
said they could not get automount expand variables in the master map also.
Any way I sure wish the manual had said this, it would have saved me some

Thanks to all the people who replied;
        arnold@mango (Arnold de Leon)
        att!allegra!chip (Chip Christian)
        deltam!dm!mark@uunet.UU.NET (mark galbraith) (Bill Hart) (Brad Passwaters : istari)
        kevins@Aus.Sun.COM (Kevin Sheehan {Consulting Poster Child})
        kla!lim@Sun.COM (Bill Lim) (?) (Mark Wiederspahn) (Keith McNeill) (Dan Transue) (Leonard Sitongia) (John Stiles) (Jon A. Tankersley)

William M. Gilroy
AT&T Pixel Machines
(908) 949-2566
Internet :
Uucp     : att!pixels!wmg

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:18 CDT