Ian Kent said:
> On Thu, 28 Apr 2005, Brian Stevens wrote:
>
>> Should the "+ypmapname" and/or nsswitch.conf allow an indirect map to
>> pick
>> up entries from both a local file AND a NIS map? I have tried many
>> revisions of autofs 4.1.3 with kernels 2.4.21 and 2.6.x, and what I am
>> experiencing does not seem to correlate with the ChangeLogs I've read.
>>
>> I have an auto.master map which includes "/apps auto.apps". auto.apps
>> is
>> distributed via NIS. I would like, on one host, to override one of the
>> NIS entries with a local one. I created a local /etc/auto.apps with
>> "oracle hous0117:/vol/vol013/oracle-hous0138". I would like the /apps
>> automount to use that local entry from oracle, but also grab any other
>> entries from the NIS map. I have found that I can get the indirect map
>> to
>> use the local file OR the NIS map, but not both.
>>
>> Is that possible? Should it work?
>
> Not possible at the moment.
>
> This is quite difficult to implement within the current autofs design.
Just in case anyone is digging through the archives looking for a
solution, I came up with this quick & dirty, but effective, solution: I
made the auto.apps an executable map as:
#!/bin/bash
if [[ $1 == "oracle" ]]; then
/bin/echo 'hous0117:/vol/vol013/&-${HOST}'
else
/usr/bin/ypmatch $1 auto.apps
fi
Obviously this could get ungainly rather quickly, but to override just a
couple of keys, it seems to work OK.
Brian
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs