[Date Prev][Date Next]
Re: slapadd: which database to open
Hallvard B Furuseth wrote:
> Michael Ströder writes:
>> Hallvard B Furuseth wrote:
>>> Quanah Gibson-Mount wrote in openldap-technical:
>>>> You need to specify that you want to use the config db (-n 0) with your
>>>> slapadd command.
>>> If neither -n nor -b is given, maybe slapadd should decide
>>> which database to open from the DN of the first input entry?
>> You'll never know how broken the LDIF file is => I disagree.
> What kind of breakage are you afraid of slipping through? You'll know
> if it's outside any of your suffixes, or if it spans two databases.
> Though the latter only after the first has been modified.
I know that one could find a way to make it work most times and spit out
some error messages if it's wrong. Indeed I'm in favor of smarter
handling of command-line options if there's a single way to get it right.
But when implementing automagic one has to consider whether there could
be a significant amount of cases for which the user comes to the mailing
list asking silly questions because he don't understand the error
message. In this particular case I'd vote for forcing the user to learn
how to use -n or -b.