On Mon, 2009-02-16 at 20:41 +0100, Daniel Schwager wrote:
> Hi Ian,
>
> thx for clarify. I tried now about 2 days to convert
> the following file-map to a program-map - but I failed.
>
> Could you give me a hint ?
>
> *** /etc/auto.master
> /home/f /etc/auto.test1
>
> *** /etc/auto.test1
> test1 -rw / :/tmp \
> /test :/var
>
> This works like a Charme
> [r...@fs1 /home]$ /etc/init.d/autofs restart
> Stopping automounter: done.
> Starting automounter: done.
> [r...@fs1 /home]$ ls /home/f/test1
> DataDir_-usr-local-staf-data-STAF.tmp STAF.tmp STAFIPC_STAF
> STAFIPC_STAFJSTAF_STAFJVM1 autofs-dynamic.local autofs-dynamic.remote
> hsperfdata_root test
> [r...@fs1 /home]$ ls /home/f/test1/test
> autofs backups cache lib local lock log mail opt run spool
> tmp www
>
>
> I tried a lot of variants with a program map - but I did't get
> managed to mount a root (like "test1 -rw / :/tmp") via
> program-map.
> Mounting ONLY a subdir (like "test1 -rw /xx :/tmp") works fine.
>
> Could you please give me a sample converting the file-map sample above
> (auto.test1)
> to a program-map ?
Do what I said in my previous post.
Return the location without the key.
So you would do something like:
If "key matches passed in key (in $1)"; then
echo "-rw / :/tmp /other :/other"
fi
Should do what you want.
Ian
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs