* Which version to uses, nsswitch.conf parse errors
@ 2009-04-28 20:12 Marc Weber
2009-04-29 1:59 ` Ian Kent
2009-04-29 3:19 ` Ian Kent
0 siblings, 2 replies; 4+ messages in thread
From: Marc Weber @ 2009-04-28 20:12 UTC (permalink / raw)
To: autofs
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?
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?
Should I stick to the older automount version?
Maybe you can help me understand the problem so that I can try improving
the error message?
I've built the 9a77464b git version.
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Which version to uses, nsswitch.conf parse errors
2009-04-28 20:12 Which version to uses, nsswitch.conf parse errors Marc Weber
@ 2009-04-29 1:59 ` Ian Kent
2009-04-29 3:19 ` Ian Kent
1 sibling, 0 replies; 4+ messages in thread
From: Ian Kent @ 2009-04-29 1:59 UTC (permalink / raw)
To: Marc Weber; +Cc: autofs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Which version to uses, nsswitch.conf parse errors
2009-04-28 20:12 Which version to uses, nsswitch.conf parse errors Marc Weber
2009-04-29 1:59 ` Ian Kent
@ 2009-04-29 3:19 ` Ian Kent
2009-04-29 22:50 ` Marc Weber
1 sibling, 1 reply; 4+ messages in thread
From: Ian Kent @ 2009-04-29 3:19 UTC (permalink / raw)
To: Marc Weber; +Cc: autofs
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?
>
> 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 ]
This probably results from not having a <NL> at the end of the line.
It's not a simple matter to deal with this invalid input as we read the
nsswitch input from a stream and <EOF> needs to be handled by the parser
not the rules.
Ian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Which version to uses, nsswitch.conf parse errors
2009-04-29 3:19 ` Ian Kent
@ 2009-04-29 22:50 ` Marc Weber
0 siblings, 0 replies; 4+ messages in thread
From: Marc Weber @ 2009-04-29 22:50 UTC (permalink / raw)
To: autofs
Hi Ian,
Indeed you'r right. There wasn't a \n at the end.
I was sure I tried that. I did. I must have messed something up while
playing with the parser. the syntax clearly states source NL;
I'll do some further investigation.
Using automount compiled by the system there is no error anymore. Strange.
Anyway thanks to your great support!
Marc Weber
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-29 22:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-28 20:12 Which version to uses, nsswitch.conf parse errors Marc Weber
2009-04-29 1:59 ` Ian Kent
2009-04-29 3:19 ` Ian Kent
2009-04-29 22:50 ` Marc Weber
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.