All of lore.kernel.org
 help / color / mirror / Atom feed
* -Dvariable=value not working?
@ 2010-07-28 12:19 Richard Gillman
  2010-09-20  1:46 ` Ian Kent
  2010-09-21 22:35 ` Joseph V Moss
  0 siblings, 2 replies; 3+ messages in thread
From: Richard Gillman @ 2010-07-28 12:19 UTC (permalink / raw)
  To: autofs

I've got a Suse SLES 11 system running automount 5.0.3 which stubbornly 
refuses to variable substitution.

friesian:/etc/sysconfig # automount -V

Linux automount version 5.0.3

Directories:

config dir: /etc/sysconfig

maps dir: /etc

modules dir: /usr/lib64/autofs

Compile options:

DISABLE_MOUNT_LOCKING ENABLE_FORCED_SHUTDOWN ENABLE_IGNORE_BUSY_MOUNTS

WITH_LDAP WITH_SASL LIBXML2_WORKAROUND


I've got LOCAL_OPTIONS="-DNERCARCH=linux" in /etc/sysconfig/autofs (I've 
also tried "-D  NERCARCH=linux", "-D NERCARCH='linux'").

I've stopped nscd.

I've restarted automount /etc/init.d/autofs restart

friesian:/etc/sysconfig # ps -ef|grep automount

root 14378 1 0 11:12 ? 00:00:00 /usr/sbin/automount -p 
/var/run/automount.pid -O -DNERCARCH=linux

If I now do a ls /nerc/bin (one of my automounted directories),
friesian:/etc/sysconfig # ls /nerc/bin
ls: cannot open directory /nerc/bin: No such file or directory
friesian:/etc/sysconfig #

and I get the following in syslog.

Jul 28 10:30:03 friesian automount[13976]: lookup_mount: lookup(ldap): 
bin -> -ro mercury:/local/master/$NERCARCH/bin
Jul 28 10:30:03 friesian automount[13976]: parse_mount: parse(sun): 
expanded entry: -ro mercury:/local/master//bin

No substitution of the NERCARCH variable.

On another system, this time CentOS 5.5

Linux automount version 5.0.1-0.rc2.143.el5


Directories:

config dir: /etc/sysconfig

maps dir: /etc

modules dir: /usr/lib64/autofs


Compile options:

DISABLE_MOUNT_LOCKING ENABLE_IGNORE_BUSY_MOUNTS WITH_HESIOD WITH_LDAP

WITH_SASL

[root@who1 sysconfig]# ps -ef|grep auto

root 10263 1 0 10:59 ? 00:00:00 automount -DNERCARCH=linux

root 10320 10162 0 10:59 pts/4 00:00:00 grep auto


[root@who1 sysconfig]# ls /nerc/bin
env_clean  lookup  rc.d  setup_type
[root@who1 sysconfig]#

I get in syslog,

Jul 28 10:52:26 who1 automount[10210]: lookup_mount: lookup(ldap): bin 
-> orwell:/itsspool/master.itss/$NERCARCH/bin

Jul 28 10:52:26 who1 automount[10210]: parse_mount: parse(sun): expanded 
entry: orwell:/itsspool/master.itss/linux/bin

Which is what I would expect to see.

Any suggestions as to what I might be doing wrong on the Suse box?

tia, Dick


-- 
Richard Gillman
IST UNIX Systems Group, Maclean Building, Wallingford OX10 8BB
Tel: 01491 - 692 339
Fax: 01491 - 692 424

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: -Dvariable=value not working?
  2010-07-28 12:19 -Dvariable=value not working? Richard Gillman
@ 2010-09-20  1:46 ` Ian Kent
  2010-09-21 22:35 ` Joseph V Moss
  1 sibling, 0 replies; 3+ messages in thread
From: Ian Kent @ 2010-09-20  1:46 UTC (permalink / raw)
  To: R.Gillman; +Cc: autofs

On Wed, 2010-07-28 at 13:19 +0100, Richard Gillman wrote:
> I've got a Suse SLES 11 system running automount 5.0.3 which stubbornly 
> refuses to variable substitution.
> 
> friesian:/etc/sysconfig # automount -V
> 
> Linux automount version 5.0.3
> 
> Directories:
> 
> config dir: /etc/sysconfig
> 
> maps dir: /etc
> 
> modules dir: /usr/lib64/autofs
> 
> Compile options:
> 
> DISABLE_MOUNT_LOCKING ENABLE_FORCED_SHUTDOWN ENABLE_IGNORE_BUSY_MOUNTS
> 
> WITH_LDAP WITH_SASL LIBXML2_WORKAROUND
> 
> 
> I've got LOCAL_OPTIONS="-DNERCARCH=linux" in /etc/sysconfig/autofs (I've 
> also tried "-D  NERCARCH=linux", "-D NERCARCH='linux'").

Does the init script in SLES 11 actually use LOCAL_OPTIONS?
That changed in version 5, you should have a look at the autofs
configuration file (wherever that is in SLES 11) and the init script.
You might need to use OPTIONS in configuration.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: -Dvariable=value not working?
  2010-07-28 12:19 -Dvariable=value not working? Richard Gillman
  2010-09-20  1:46 ` Ian Kent
@ 2010-09-21 22:35 ` Joseph V Moss
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph V Moss @ 2010-09-21 22:35 UTC (permalink / raw)
  To: R.Gillman@nerc.ac.uk; +Cc: autofs@linux.kernel.org

> I've got a Suse SLES 11 system running automount 5.0.3 which stubbornly 
> refuses to variable substitution.
> 
[...]
> I've got LOCAL_OPTIONS="-DNERCARCH=linux" in /etc/sysconfig/autofs (I've 
> also tried "-D  NERCARCH=linux", "-D NERCARCH='linux'").
[...]
> friesian:/etc/sysconfig # ps -ef|grep automount
> 
> root 14378 1 0 11:12 ? 00:00:00 /usr/sbin/automount -p 
> /var/run/automount.pid -O -DNERCARCH=linux
                         ^^^^

The -O option is consuming the next arg and using '-DNERCARCH=linux'
as a mount option.

The SLES11 autofs init script uses $LOCAL_OPTIONS like this:

	AUTOFS_OPTIONS="-O $LOCAL_OPTIONS $AUTOFS_OPTIONS"

So you need the beginning of your LOCAL_OPTIONS to be mount options.
After those, you can then do your variable assignments.

For example:

LOCAL_OPTIONS="tcp,hard,intr -DNERCARCH=linux"

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-21 22:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-28 12:19 -Dvariable=value not working? Richard Gillman
2010-09-20  1:46 ` Ian Kent
2010-09-21 22:35 ` Joseph V Moss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.