Skip to contentSkip to conversation

autofs init script doesn't support exclude

PATCH Marc MERLIN 4 participants 6 messages Sep 20, 2004 – Sep 23, 2004 Kernel automounter

lore
Share & tools
lore
#0 lore raw

From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91559

Could you add a patch of that sort so that we can override an ldap/yp auto.master and mount one or several of those mountpoints locally in /etc/fstab?

autofs 2003-05-23 18:38:27.000000000 -0700 renamed from autofs.FCS 2003-01-27 20:22:54.000000000 -0800 +15 -0
@@ -34,6 +34,11 @@
 initdir=/etc/init.d
 
 #
+# Read configuration options
+#
+[ -f /etc/sysconfig/autofs ] && . /etc/sysconfig/autofs
+
+#
 # Determine which kind of configuration we're using
 #
 system=unknown
@@ -196,6 +201,16 @@
                fi
                map=`echo $map | cut -f2- -d:`
 
+               # Process exclude list (to reduce number of automounts)
+               if [ ! -z "$AUTOFS_EXCLUDE" ]; then
+                   for exclude in $AUTOFS_EXCLUDE
+                   do
+                       if [ x"$exclude" = x"$dir" ]; then
+                           continue
+                       fi
+                   done
+               fi
+
                : echo STARTUPOPTIONS $startupoptions
                : echo DIR $dir
                : echo MAPTYPE $maptype

I don't need this anymore as this is only useful if you use nis. With ldap, you can use the following undocumented trick:

mrhat:~$ cat /etc/auto.master
/home /etc/auto.null
(doesn't work with YP though)

Thanks,
Marc

Signature · 4 lines
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/   |   Finger [email protected] for PGP key
#1 lore raw

Hi

autofs 2003-05-23 18:38:27.000000000 -0700 line 39

Quoted 11 lines · Marc MERLIN
Quoted 1 line

From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91559

autofs 2003-05-23 18:38:27.000000000 -0700 renamed from autofs.FCS 2003-01-27 20:22:54.000000000 -0800 +3 -0
@@ -34,6 +34,11 @@
 initdir=/etc/init.d
 
 #
+# Read configuration options
+#
+[ -f /etc/sysconfig/autofs ] && . /etc/sysconfig/autofs

This would be /etc/default/autofs for Debian then ...

ciao, 2ri

Signature · 4 lines
Secure email, spread GPG, clearsign all mail. http://www.gnupg.org
.
Options are optional.
 -- autofs(5)

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs

maintainer
#2 lore raw
Quoted 10 lines · Arthur Korn

Hi

Quoted 7 lines · Marc MERLIN
Quoted 1 line

From https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91559

autofs 2003-05-23 18:38:27.000000000 -0700 renamed from autofs.FCS 2003-01-27 20:22:54.000000000 -0800 +0 -0
@@ -34,6 +34,11 @@
 initdir=/etc/init.d
 
Quoted 6 lines

autofs 2003-05-23 18:38:27.000000000 -0700 line 39

Quoted 4 lines
autofs 2003-05-23 18:38:27.000000000 -0700 renamed from autofs.FCS 2003-01-27 20:22:54.000000000 -0800 +3 -0
 #
+# Read configuration options
+#
+[ -f /etc/sysconfig/autofs ] && . /etc/sysconfig/autofs

This would be /etc/default/autofs for Debian then ...

Yes, the fact that this can be different for different distributions means that it's not as straight forward as one would hope.

This is only one of the cases that needs to be catered. I'll take this on advisement but would prefer that these type of patches be carried in the distribution packages till we can deal with them in a sensible manner.

Ian

#3 lore raw

==> Regarding Re: [autofs] autofs init script doesn't support exclude; Ian Kent <[email protected]> adds:

Quoted 6 lines · Arthur Korn
Quoted 6 lines

Hi

Marc MERLIN schrieb: > >From
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91559

Quoted 1 line

--- autofs.FCS 2003-01-27 20:22:54.000000000 -0800 > +++ autofs

Quoted 8 lines
Quoted 8 lines
2003-05-23 18:38:27.000000000 -0700 > @@ -34,6 +34,11 @@ >

initdir=/etc/init.d

Quoted 3 lines

#
+# Read configuration options > +# > +[ -f /etc/sysconfig/autofs ] &&

. /etc/sysconfig/autofs

This would be /etc/default/autofs for Debian then ...

raven> Yes, the fact that this can be different for different distributions raven> means that it's not as straight forward as one would hope.

raven> This is only one of the cases that needs to be catered. I'll take raven> this on advisement but would prefer that these type of patches be raven> carried in the distribution packages till we can deal with them in a raven> sensible manner.

I'm not sure how to interpret this. What do you forsee as "a sensible manner?" Do you think the mechanism is correct? Is there a way to achieve this with the Sun automounter?

-Jeff

maintainer
#4 lore raw
Quoted 21 lines · Jeff Moyer

==> Regarding Re: [autofs] autofs init script doesn't support exclude; Ian Kent <[email protected]> adds:

Quoted 6 lines · Arthur Korn
Quoted 6 lines

Hi

Marc MERLIN schrieb: > >From
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91559

Quoted 1 line

--- autofs.FCS 2003-01-27 20:22:54.000000000 -0800 > +++ autofs

Quoted 8 lines
Quoted 8 lines
2003-05-23 18:38:27.000000000 -0700 > @@ -34,6 +34,11 @@ >

initdir=/etc/init.d

Quoted 3 lines

#
+# Read configuration options > +# > +[ -f /etc/sysconfig/autofs ] &&

. /etc/sysconfig/autofs

This would be /etc/default/autofs for Debian then ...

raven> Yes, the fact that this can be different for different distributions raven> means that it's not as straight forward as one would hope.

Quoted 8 lines

raven> This is only one of the cases that needs to be catered. I'll take raven> this on advisement but would prefer that these type of patches be raven> carried in the distribution packages till we can deal with them in a raven> sensible manner.

I'm not sure how to interpret this. What do you forsee as "a sensible manner?" Do you think the mechanism is correct? Is there a way to achieve this with the Sun automounter?

I think this will need thought wrt what distros use which directories. Perhaps some work on configure to make it happen right and at least a deal of work on the init script.

My question is "can we try to do this in a reasonably distribution independent manner". Having each distro carry its own patches is one way to identify the needs.

The reason I piped up here is that I have a crazy idea that it would be good to be able to use autofs in a range of distributions. Not just RedHat and Debian as it is now in the init script. But I'm not sure how I can do that yet.

A seperate configuration, such as is used in Linux, is not available with the Solaris automounter.

Ian

#5 lore raw

Hi

Quoted 7 lines · Ian Kent

I think this will need thought wrt what distros use which directories. Perhaps some work on configure to make it happen right and at least a deal of work on the init script.

My question is "can we try to do this in a reasonably distribution independent manner". Having each distro carry its own patches is one way to identify the needs.

Actually I don't like this at all. The debian patches to the init script of autofs3 are the reason why autofs4 is not even in unstable yet: they are copious in size and fix some delicate (shell coding, ldap) issues, so it's not obvious wheter they need to be applied to the new init script and how these problems are best fixed. Partly that's an issue of badly documented patches, but they shoudln't have accumulated like this in the first place.

What I'd much prefer to see (and actually thought about doing myself) is removing the whole "plug the master map together" and direct interaction with automount processes from the init script. Instead there should be a autofscontrol tool (similar to the ones for apache, bind, ntpd, etc; interactive operation is not strictly a requirement though) which can start, stop, reload and display status information. This would have to be able to act globally on _all_ automount instances.

The init script could then stick to assuring a sane environment and calling this control tool in the way desired by the user.

Quoted 4 lines

The reason I piped up here is that I have a crazy idea that it would be good to be able to use autofs in a range of distributions. Not just RedHat and Debian as it is now in the init script. But I'm not sure how I can do that yet.

Separating distribution specific stuff from generic code would be a first step towards that goal IMHO.

ciao, 2ri

Signature · 3 lines
Secure email, spread GPG, clearsign all mail. http://www.gnupg.org
.
"Never" is almost always earlier than you think.

_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs