* some questions about the configuration
@ 2006-01-23 15:10 Guillaume Rousse
2006-01-24 13:11 ` Ian Kent
0 siblings, 1 reply; 7+ messages in thread
From: Guillaume Rousse @ 2006-01-23 15:10 UTC (permalink / raw)
To: autofs
I recently started to clean-up the mandriva autofs package a bit, and I
have some questions about the default configuration handling.
First, it seems autofs-ldap-auto-master, which is installed in
/usr/lib/autofs, and auto.{net,smb}, which are installed in /etc, have
exactly the same purpose: to automatically produce a list of available
mount points from a remote host. If I am right, why are them installed
and named differently ? Apart the fact that the first one is native
code, whereas the others are shell scripts, they could as well get
installed as /usr/lib/autofs/auto.{ldap,smb,net}
Second, it's not clear why ldap and nis use are triggered from the
content of /etc/nsswitch.conf, while smb and net (simple rpcinfo
listing) use are triggered from content of /etc/auto.master. Shouldn't
all those syntax be available from both locations?
--
Adultery is the application of democracy to love
-- H.L. Mencken on Murphy n°2
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: some questions about the configuration 2006-01-23 15:10 some questions about the configuration Guillaume Rousse @ 2006-01-24 13:11 ` Ian Kent 2006-01-26 16:07 ` Guillaume Rousse 0 siblings, 1 reply; 7+ messages in thread From: Ian Kent @ 2006-01-24 13:11 UTC (permalink / raw) To: Guillaume Rousse; +Cc: autofs On Mon, 23 Jan 2006, Guillaume Rousse wrote: > I recently started to clean-up the mandriva autofs package a bit, and I > have some questions about the default configuration handling. > > First, it seems autofs-ldap-auto-master, which is installed in > /usr/lib/autofs, and auto.{net,smb}, which are installed in /etc, have > exactly the same purpose: to automatically produce a list of available > mount points from a remote host. If I am right, why are them installed > and named differently ? Apart the fact that the first one is native > code, whereas the others are shell scripts, they could as well get > installed as /usr/lib/autofs/auto.{ldap,smb,net} the autofs-ldap-auto-master reads the master map from an ldap server. Only the master map. All the things in /usr/lib/autofs are system things, internal, whereas things in the map directory, often /etc are the user maps. The example program maps auto.smb and auto.net are, well, examples. Given a key they return the entry for it. Neither returns master map entries. The master map and the maps that are contained in the master map have a different syntax. > > Second, it's not clear why ldap and nis use are triggered from the > content of /etc/nsswitch.conf, while smb and net (simple rpcinfo > listing) use are triggered from content of /etc/auto.master. Shouldn't > all those syntax be available from both locations? Master vs client maps again. Ian ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some questions about the configuration 2006-01-24 13:11 ` Ian Kent @ 2006-01-26 16:07 ` Guillaume Rousse 2006-01-26 17:10 ` Jeff Moyer 0 siblings, 1 reply; 7+ messages in thread From: Guillaume Rousse @ 2006-01-26 16:07 UTC (permalink / raw) To: autofs Ian Kent wrote: > On Mon, 23 Jan 2006, Guillaume Rousse wrote: > > >>I recently started to clean-up the mandriva autofs package a bit, and I >>have some questions about the default configuration handling. >> >>First, it seems autofs-ldap-auto-master, which is installed in >>/usr/lib/autofs, and auto.{net,smb}, which are installed in /etc, have >>exactly the same purpose: to automatically produce a list of available >>mount points from a remote host. If I am right, why are them installed >>and named differently ? Apart the fact that the first one is native >>code, whereas the others are shell scripts, they could as well get >>installed as /usr/lib/autofs/auto.{ldap,smb,net} > > > the autofs-ldap-auto-master reads the master map from an ldap server. Only > the master map. > > All the things in /usr/lib/autofs are system things, internal, whereas > things in the map directory, often /etc are the user maps. The example > program maps auto.smb and auto.net are, well, examples. Given a key they > return the entry for it. Neither returns master map entries. OK, I understand they have different nature, so they can't have the exact same naming scheme. But if auto.smb and auto.smb are exemple, they should not get installed, and especially not among configuration files whereas they are executables programs. I'd rather have called ldap.master.map, smb.user.map and net.user.map, or something similar, and have them installed in the same place. > The master map and the maps that are contained in the master map have a > different syntax. > > >>Second, it's not clear why ldap and nis use are triggered from the >>content of /etc/nsswitch.conf, while smb and net (simple rpcinfo >>listing) use are triggered from content of /etc/auto.master. Shouldn't >>all those syntax be available from both locations? > > > Master vs client maps again. According to my init script understanding, however, it seems you can't refer to LDAP user maps from /etc/auto.master, whereas you can refer to NIS user maps from there, using a syntax such as '+foobar', which is not documented in auto.master man page. -- The more work you have to get done, the more likely it is to rain. -- Precipitation Precepts n°1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some questions about the configuration 2006-01-26 16:07 ` Guillaume Rousse @ 2006-01-26 17:10 ` Jeff Moyer 2006-01-27 14:38 ` Guillaume Rousse 0 siblings, 1 reply; 7+ messages in thread From: Jeff Moyer @ 2006-01-26 17:10 UTC (permalink / raw) To: Guillaume Rousse; +Cc: autofs ==> Regarding Re: [autofs] some questions about the configuration; Guillaume Rousse <Guillaume.Rousse@inria.fr> adds: Guillaume.Rousse> Ian Kent wrote: >> On Mon, 23 Jan 2006, Guillaume Rousse wrote: >> >> >>> I recently started to clean-up the mandriva autofs package a bit, and I >>> have some questions about the default configuration handling. >>> >>> First, it seems autofs-ldap-auto-master, which is installed in >>> /usr/lib/autofs, and auto.{net,smb}, which are installed in /etc, have >>> exactly the same purpose: to automatically produce a list of available >>> mount points from a remote host. If I am right, why are them installed >>> and named differently ? Apart the fact that the first one is native >>> code, whereas the others are shell scripts, they could as well get >>> installed as /usr/lib/autofs/auto.{ldap,smb,net} >> >> >> the autofs-ldap-auto-master reads the master map from an ldap >> server. Only the master map. >> >> All the things in /usr/lib/autofs are system things, internal, whereas >> things in the map directory, often /etc are the user maps. The example >> program maps auto.smb and auto.net are, well, examples. Given a key they >> return the entry for it. Neither returns master map entries. Guillaume.Rousse> OK, I understand they have different nature, so they Guillaume.Rousse> can't have the exact same naming scheme. But if auto.smb Guillaume.Rousse> and auto.smb are exemple, they should not get installed, Guillaume.Rousse> and especially not among configuration files whereas they Guillaume.Rousse> are executables programs. Guillaume.Rousse> I'd rather have called ldap.master.map, smb.user.map and Guillaume.Rousse> net.user.map, or something similar, and have them Guillaume.Rousse> installed in the same place. You can modify auto.net or auto.smb to suit your needs. In that sense, they are user-configurable automounter maps, and belong with the other maps. I understand that autofs configuration is a bit overwhelming, and the documentation is lacking. Perhaps we should focus on improving the documentation. >> The master map and the maps that are contained in the master map have a >> different syntax. >> >> >>> Second, it's not clear why ldap and nis use are triggered from the >>> content of /etc/nsswitch.conf, while smb and net (simple rpcinfo >>> listing) use are triggered from content of /etc/auto.master. Shouldn't >>> all those syntax be available from both locations? >> >> >> Master vs client maps again. Guillaume.Rousse> According to my init script understanding, however, it Guillaume.Rousse> seems you can't refer to LDAP user maps from Guillaume.Rousse> /etc/auto.master, whereas you can refer to NIS user maps Guillaume.Rousse> from there, using a syntax such as '+foobar', which is Guillaume.Rousse> not documented in auto.master man page. Your understanding is wholly incorrect. The following web sites are good references that I use frequently. I hope they are helpful to you. http://docs.sun.com/app/docs/doc/805-3479/6j3agk1v5?q=autofs&a=view http://docs.sun.com/app/docs/doc/816-0211/6m6nc66nc?a=view http://www.ldapguru.com/modules/newbb/viewtopic.php?topic_id=2029&forum=6 Regards, Jeff ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some questions about the configuration 2006-01-26 17:10 ` Jeff Moyer @ 2006-01-27 14:38 ` Guillaume Rousse 2006-01-27 15:51 ` Jeff Moyer 0 siblings, 1 reply; 7+ messages in thread From: Guillaume Rousse @ 2006-01-27 14:38 UTC (permalink / raw) Cc: autofs Jeff Moyer wrote: > Guillaume.Rousse> OK, I understand they have different nature, so they > Guillaume.Rousse> can't have the exact same naming scheme. But if auto.smb > Guillaume.Rousse> and auto.smb are exemple, they should not get installed, > Guillaume.Rousse> and especially not among configuration files whereas they > Guillaume.Rousse> are executables programs. > > Guillaume.Rousse> I'd rather have called ldap.master.map, smb.user.map and > Guillaume.Rousse> net.user.map, or something similar, and have them > Guillaume.Rousse> installed in the same place. > > You can modify auto.net or auto.smb to suit your needs. In that sense, > they are user-configurable automounter maps, and belong with the other > maps. I understand that autofs configuration is a bit overwhelming, and > the documentation is lacking. Perhaps we should focus on improving the > documentation. This does still look like a poor hack: if they are supposed to be adaptable to specific user needs, they should use a configuration file. And if the not flexible enough, be kept as exemples in congifuration, not installed by default (especially if not automatically used). And yes, documentation could get improved :) >>>The master map and the maps that are contained in the master map have a >>>different syntax. >>> >>> >>> >>>>Second, it's not clear why ldap and nis use are triggered from the >>>>content of /etc/nsswitch.conf, while smb and net (simple rpcinfo >>>>listing) use are triggered from content of /etc/auto.master. Shouldn't >>>>all those syntax be available from both locations? >>> >>> >>>Master vs client maps again. > > Guillaume.Rousse> According to my init script understanding, however, it > Guillaume.Rousse> seems you can't refer to LDAP user maps from > Guillaume.Rousse> /etc/auto.master, whereas you can refer to NIS user maps > Guillaume.Rousse> from there, using a syntax such as '+foobar', which is > Guillaume.Rousse> not documented in auto.master man page. > > Your understanding is wholly incorrect. The following web sites are good > references that I use frequently. I hope they are helpful to you. > > http://docs.sun.com/app/docs/doc/805-3479/6j3agk1v5?q=autofs&a=view > http://docs.sun.com/app/docs/doc/816-0211/6m6nc66nc?a=view > http://www.ldapguru.com/modules/newbb/viewtopic.php?topic_id=2029&forum=6 Thanks for the explanation, I understand better. Let me rephrase: - it is possible to refer to additional NIS master map from /etc/auto.master, using a syntax not described in auto.master man page. - it is not possible to do the same with ldap Is this more correct ? BTW, the default init script is quite ugly, it calls catnismap with each additional NIS master map each time a line is found beginning with '+'. I'd suggest instead something as: if [ -f /etc/auto.master ] ; then awk '/^[^#]/{print $0}' /etc/auto.master | ( while read line do if [[ "$line" == +* ]]; then catnismap ${line:1} else echo $line fi done ) fi It uses bash-specific constructs, but this is a bash script after all. -- After assembly, it will always be observed that the gasket is on the bench -- Assembly General Shefields Corollaries n°4 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some questions about the configuration 2006-01-27 14:38 ` Guillaume Rousse @ 2006-01-27 15:51 ` Jeff Moyer 2006-02-09 15:30 ` Guillaume Rousse 0 siblings, 1 reply; 7+ messages in thread From: Jeff Moyer @ 2006-01-27 15:51 UTC (permalink / raw) To: Guillaume Rousse; +Cc: autofs ==> Regarding Re: [autofs] some questions about the configuration; Guillaume Rousse <Guillaume.Rousse@inria.fr> adds: Guillaume.Rousse> Jeff Moyer wrote: OK, I understand they have different Guillaume.Rousse> nature, so they can't have the exact same naming Guillaume.Rousse> scheme. But if auto.smb and auto.smb are exemple, they Guillaume.Rousse> should not get installed, and especially not among Guillaume.Rousse> configuration files whereas they are executables Guillaume.Rousse> programs. >> Guillaume.Rousse> I'd rather have called ldap.master.map, smb.user.map and Guillaume.Rousse> net.user.map, or something similar, and have them Guillaume.Rousse> installed in the same place. >> You can modify auto.net or auto.smb to suit your needs. In that sense, >> they are user-configurable automounter maps, and belong with the other >> maps. I understand that autofs configuration is a bit overwhelming, and >> the documentation is lacking. Perhaps we should focus on improving the >> documentation. Guillaume.Rousse> This does still look like a poor hack: if they are Guillaume.Rousse> supposed to be adaptable to specific user needs, they Guillaume.Rousse> should use a configuration file. And if the not flexible Guillaume.Rousse> enough, be kept as exemples in congifuration, not Guillaume.Rousse> installed by default (especially if not automatically Guillaume.Rousse> used). This is an opinion that I do not share. /net is configured by default, and so the auto.net map is used by default. Additionally, supporting program maps makes the automounter quite a bit more flexible that it would otherwise be. Guillaume.Rousse> And yes, documentation could get improved :) >>>> The master map and the maps that are contained in the master map have >>>> a different syntax. >>>> >>>> >>>> >>>>> Second, it's not clear why ldap and nis use are triggered from the >>>>> content of /etc/nsswitch.conf, while smb and net (simple rpcinfo >>>>> listing) use are triggered from content of >>>>> /etc/auto.master. Shouldn't all those syntax be available from both >>>>> locations? >>>> >>>> >>>> Master vs client maps again. >> Guillaume.Rousse> According to my init script understanding, however, it Guillaume.Rousse> seems you can't refer to LDAP user maps from Guillaume.Rousse> /etc/auto.master, whereas you can refer to NIS user maps Guillaume.Rousse> from there, using a syntax such as '+foobar', which is Guillaume.Rousse> not documented in auto.master man page. >> Your understanding is wholly incorrect. The following web sites are >> good references that I use frequently. I hope they are helpful to you. >> >> http://docs.sun.com/app/docs/doc/805-3479/6j3agk1v5?q=autofs&a=view >> http://docs.sun.com/app/docs/doc/816-0211/6m6nc66nc?a=view >> http://www.ldapguru.com/modules/newbb/viewtopic.php?topic_id=2029&forum=6 Guillaume.Rousse> Thanks for the explanation, I understand better. Let me Guillaume.Rousse> rephrase: - it is possible to refer to additional NIS Guillaume.Rousse> master map from /etc/auto.master, using a syntax not Guillaume.Rousse> described in auto.master man page. - it is not possible Guillaume.Rousse> to do the same with ldap Is this more correct ? Yes, this is correct. However, note that the way it is implemented (currently nis only) is incorrect. Any included map should be looked for in the locations as specified in /etc/nsswitch.conf. This is currently not honored. Again, we're working to address this limitation. Guillaume.Rousse> BTW, the default init script is quite ugly, it calls Guillaume.Rousse> catnismap with each additional NIS master map each time a Guillaume.Rousse> line is found beginning with '+'. Patches are welcome. Please use the -up options to diff. -Jeff ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: some questions about the configuration 2006-01-27 15:51 ` Jeff Moyer @ 2006-02-09 15:30 ` Guillaume Rousse 0 siblings, 0 replies; 7+ messages in thread From: Guillaume Rousse @ 2006-02-09 15:30 UTC (permalink / raw) To: autofs [-- Attachment #1: Type: text/plain, Size: 2761 bytes --] Jeff Moyer wrote: > ==> Regarding Re: [autofs] some questions about the configuration; Guillaume Rousse <Guillaume.Rousse@inria.fr> adds: > > Guillaume.Rousse> Jeff Moyer wrote: OK, I understand they have different > Guillaume.Rousse> nature, so they can't have the exact same naming > Guillaume.Rousse> scheme. But if auto.smb and auto.smb are exemple, they > Guillaume.Rousse> should not get installed, and especially not among > Guillaume.Rousse> configuration files whereas they are executables > Guillaume.Rousse> programs. > Guillaume.Rousse> I'd rather have called ldap.master.map, smb.user.map and > Guillaume.Rousse> net.user.map, or something similar, and have them > Guillaume.Rousse> installed in the same place. >>> You can modify auto.net or auto.smb to suit your needs. In that sense, >>> they are user-configurable automounter maps, and belong with the other >>> maps. I understand that autofs configuration is a bit overwhelming, and >>> the documentation is lacking. Perhaps we should focus on improving the >>> documentation. > Guillaume.Rousse> This does still look like a poor hack: if they are > Guillaume.Rousse> supposed to be adaptable to specific user needs, they > Guillaume.Rousse> should use a configuration file. And if the not flexible > Guillaume.Rousse> enough, be kept as exemples in congifuration, not > Guillaume.Rousse> installed by default (especially if not automatically > Guillaume.Rousse> used). > > This is an opinion that I do not share. /net is configured by default, and > so the auto.net map is used by default. Additionally, supporting program > maps makes the automounter quite a bit more flexible that it would > otherwise be. I never pretended the opposite. My point is that you can't label executable scripts as 'configuration' and put them under /etc, just because users could eventually modify them to suit their needs. This is not FHS compliant. Either they work as they are (which seems the case from waht you say and from my own tests with auto.net), and they should get installed under program directory (/usr/lib/autofs), with eventually some aditional configuration file under /etc. Either they are unfinished scripts, provided as exemples, that are meant to be customised by users, and finally installed as programs manually under local script directory (/usr/local/sbin). [..] > Guillaume.Rousse> BTW, the default init script is quite ugly, it calls > Guillaume.Rousse> catnismap with each additional NIS master map each time a > Guillaume.Rousse> line is found beginning with '+'. > > Patches are welcome. Please use the -up options to diff. Here are two distinct patches, with a clearer syntax, less external process call, and correcting multiple call to catnismap from getfilemounts. [-- Attachment #2: autofs.init.getfilemounts.patch --] [-- Type: text/plain, Size: 908 bytes --] --- samples/rc.autofs.in 2005-04-11 13:30:54.000000000 +0200 +++ samples/rc.autofs.in.new 2006-02-03 17:05:41.000000000 +0100 @@ -135,16 +135,13 @@ function catnismap() function getfilemounts() { if [ -f /etc/auto.master ] ; then - cat /etc/auto.master | awk '{print $0}' | sed -e '/^#/d' -e '/^$/d' | ( - while read auto_master_in + awk '/^[^#]/{print $0}' /etc/auto.master | ( + while read line do - if [ "`echo $auto_master_in | grep '^+'`" = "" ]; then - echo $auto_master_in + if [[ "$line" == +* ]]; then + catnismap ${line:1} else - for nismap in `cat /etc/auto.master | grep '^\+' | - sed -e '/^#/d' -e '/^$/d'`; do - catnismap `echo "$nismap" | sed -e 's/^\+//'` - done + echo $line fi done ) [-- Attachment #3: autofs.init.getscheme.patch --] [-- Type: text/plain, Size: 557 bytes --] --- samples/rc.autofs.in 2005-04-11 13:30:54.000000000 +0200 +++ samples/rc.autofs.in.new 2006-02-03 17:08:03.000000000 +0100 @@ -111,15 +111,13 @@ fi # function getschemes() { - SOURCES=`grep ^automount: /etc/nsswitch.conf | \ - sed -e 's/^.*://' -e 's/\[.*\]/ /g'` + SOURCES=`awk -F: '/^automount/{print $2}' /etc/nsswitch.conf` - if [ `echo $SOURCES | awk '{print NF}'` -gt 0 ] - then - echo ${SOURCES} - else - echo files - fi + if [ -n "${SOURCES// /}" ]; then + echo ${SOURCES} + else + echo files + fi } function catnismap() [-- Attachment #4: Type: text/plain, Size: 140 bytes --] _______________________________________________ autofs mailing list autofs@linux.kernel.org http://linux.kernel.org/mailman/listinfo/autofs ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-02-09 15:30 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-01-23 15:10 some questions about the configuration Guillaume Rousse 2006-01-24 13:11 ` Ian Kent 2006-01-26 16:07 ` Guillaume Rousse 2006-01-26 17:10 ` Jeff Moyer 2006-01-27 14:38 ` Guillaume Rousse 2006-01-27 15:51 ` Jeff Moyer 2006-02-09 15:30 ` Guillaume Rousse
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.