From: Guillaume Rousse <Guillaume.Rousse@inria.fr>
To: autofs@linux.kernel.org
Subject: Re: some questions about the configuration
Date: Thu, 09 Feb 2006 16:30:42 +0100 [thread overview]
Message-ID: <43EB6022.7030608@inria.fr> (raw)
In-Reply-To: <17370.16787.475552.297972@segfault.boston.redhat.com>
[-- 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
prev parent reply other threads:[~2006-02-09 15:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43EB6022.7030608@inria.fr \
--to=guillaume.rousse@inria.fr \
--cc=autofs@linux.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.