Apart from using cat to pipe files to grep?
$ grep -v ^# /etc/auto.master [/CODE]
You've posted in the SLED forum, The SLES forums are at [url]https://forums.suse.com/forumdisplay.php?8-SUSE-Linux-Enterprise-Server[/url] but autofs is common to both, so no worries.
But as to your autofs problem, is this:
[QUOTE=xgadlga;17668]
[B]glitst02:~ # cat /etc/auto.master | grep -v \\#[/B]
/- /etc/auto.etis --timeo=1 --ghost
+auto.master
[B]glitst02:~ # cat /etc/auto.etis | grep -v \\#[/B]
/mnt/common -fstype=nfs4,ro,soft,bg,intr,suid,dev,exec,auto,no user,async,retrans=1,retry=0 glitst01:/opt/common
[/QUOTE]
The result of copy/paste or you typing it all out? There shouldn't be a space in 'no user'. (I've actually added a space in there in my post. In your post it shows has having a space, when I copy/paste it to a text editor there's a space, but when I quote the text the forum software seems to remove the space. Which is interesting.) Also I'm pretty certain 'timeo' isn't a valid option and if it's supposed to be 'timeout' then setting it to 1 seems overly enthusiastic, possibly problematically so. I once tracked a weird issue I was seeing to my having specified a timeout value that was quite short.
That said, I've tried what you've posted removing the erroneous space and changing the name of the server to one local to me which has an nfs4 mount on, and it works:
[CODE]linux-7xyj:~ # grep -v ^# /etc/auto.master
/- /etc/auto.etis --timeo=1 --ghost
+auto.master
linux-7xyj:~ # grep -v ^# /etc/auto.etis
/mnt/common -fstype=nfs4,ro,soft,bg,intr,suid,dev,exec,auto,nouser,async,retrans=1,retry=0 xxx.xxx.xxx.xxx.xxx:/apps
linux-7xyj:~ # ls /mnt
boo common foo yoo
linux-7xyj:~ # mount | grep 'mnt/common'
linux-7xyj:~ # ls /mnt/common/ > /dev/null
linux-7xyj:~ # mount | grep 'mnt/common'
xxx.xxx.xxx.xxx.xxx:/apps on /mnt/common type nfs4 (ro,timeo=1,soft,intr,retrans=1,retry=0,sloppy,addr=nnn.nnn.nnn.nnn,clientaddr=nnn.nnn.nnn.nnn)
linux-7xyj:~ # [/CODE]
This is on SLED 11 SP3 mind you, I do not have any machines running SLES 11 SP2. I have SLES 11 SP3 but not accessible to play with right now.
Unless there's some significant difference between autofs on SLED 11 SP3 and SLES 11 SP2 all I can think off hand is to check your files for erroneous spaces and such. If you're not using NIS for autofs maps I'd comment out the '+auto.master' line in /etc/auto.master, though it doesn't seem to prevent it working, at least not on my machine.
I've never actually done direct mounting. I have a set up where I need to have something mounted at / and I can't have the contents of that controlled by autofs, just like you can't have the contents of /opt so controlled. Rather than use direct mounting I use a symbolic link instead.
[CODE]:~> file /apps
/apps: symbolic link to `/mnt/auto/apps'
:~> grep -v ^# /etc/auto.master
/home yp auto.home rsize=32768,wsize=32768,nosuid,noatime
/mnt/auto /etc/auto.apps
:~> grep -v ^# /etc/auto.apps
apps -fstype=nfs4 -ro -nosuid -tcp xxx.xxx.xxx.xxx.xxx:/apps
:~>
I set it up about five years ago and can’t remember why I used a symbolic link, but if you can’t get it working with direct mounting you could try using indirect and symbolic links.
When posting output of commands or contents of files it’s best to wrap it in CODE tags because it makes it clear where the output starts and ends and can also help avoid formatting issues. Look for the # button when composing the post. E.g.
$ date
Mon 25 Nov 22:15:50 GMT 2013