All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Marc Weber <marco-oweber@gmx.de>
Cc: autofs@linux.kernel.org
Subject: Re: Which version to uses, nsswitch.conf parse errors
Date: Wed, 29 Apr 2009 09:59:51 +0800	[thread overview]
Message-ID: <49F7B497.80006@themaw.net> (raw)
In-Reply-To: <20090428201219.GC6042@gmx.de>

Marc Weber wrote:
> Hi at all,
> 
> I'd like to add some automount support to the nixos linux distribution.
> however I don't know exactly which version to I should use?
> 
> automount v5 (autfs4 kernel module (?)) or automount v4?

Version 5 has nsswitch support.

The kernel module used should be autofs4.

The reason for the name is historic but autofs4 supports autofs kernel
protocols v3, v4 and v5 whereas the autofs module supports autofs kernel
protocol v3.

> 
> For now I've tried v5. However when starting automount I get some parse
> errors:
> 
> [...]
> --accepting rule at line 92 ("
> ")
> --accepting rule at line 92 ("
> ")
> --accepting rule at line 87 ("automount:")
> --accepting rule at line 95 (" ")
> --accepting rule at line 97 ("files")
> syntax error in nsswitch config near [ syntax error ]
> 
> My nsswitch.conf is attached below.
> 
> 
> It looks to me like the lexer ignoring everything until it reaches
> a ^automount line?

Well, yes it's looking for automount map sources, what else would you
expect?

> 
> Should I stick to the older automount version?

Don't think so. There's no nsswitch support in v4 and v4 is getting
limited attention these days.

> Maybe you can help me understand the problem so that I can try improving
> the error message?

Most of the time the message reflects the part of the line the message
occurred at but, if the parser gets an error at a point that doesn't
have text for the token it just prints the above.

The error handling in the lex/yacc (Flex/Bison actually) parser is
painful to the max. While that may well be my poor implementation the
fact that I ended up with a poor implementation after so much effort is
a problem in itself.

The question of whether to expand the use of a parser generator to the
rest of the parsing in autofs or to re-write the whole lot with a
manually crafted lexer and parser is still undecided.

> 
> I've built the 9a77464b git version.

Right, that's fairly recent.
The nsswitch.conf below looks OK to me and the parse works fine for me
here on an entry formatted the same way.

> 
> Thanks
> Marc Weber
> 
> My nsswitch.conf:
> 
> psswd:         ldap files
> group:          ldap files
> shadow:         ldap files
> 
> hosts:          files dns
> networks:       files dns
> 
> services:       files
> protocols:      files
> 
> automount: files nis
> 
> _______________________________________________
> autofs mailing list
> autofs@linux.kernel.org
> http://linux.kernel.org/mailman/listinfo/autofs

  reply	other threads:[~2009-04-29  1:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-28 20:12 Which version to uses, nsswitch.conf parse errors Marc Weber
2009-04-29  1:59 ` Ian Kent [this message]
2009-04-29  3:19 ` Ian Kent
2009-04-29 22:50   ` Marc Weber

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=49F7B497.80006@themaw.net \
    --to=raven@themaw.net \
    --cc=autofs@linux.kernel.org \
    --cc=marco-oweber@gmx.de \
    /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.