On Wed, 12 Oct 2011, Rob Crittenden wrote:
> >>2) Be restrictive on ParseError and throw an error telling them to fix
> >>their config file. Pros: we don't break an existing setup. Cons: FreeIPA
> >>installation has been broken.
> >>3) Default to one of the above but provide a command-line flag to behave
> >>the other way. This is probably our best bet. I'd suggest defaulting to
> >>replacing the config file on ParseError (with a loud message at the END
> >>of ipa-client-install pointing to the backed-up file).
> >Attached patch tries to implement these ideas. It is untested as I
> >wanted to get feedback on the approach first.
> Well, in the "generate new file" option I think the output is a bit
> + print "New SSSD config will be generated. The old one is
> backed up and can be restored during uninstall"
> There could have been no existing sssd.conf, right?
> + logging.error("Failed to parse SSSD configuration and will
> generate new one")
> This could imply that an error occurred when in fact there just was
> no sssd.conf to import.
> Otherwise the approach looks good.
Thanks, will do more testing tomorrow and make better phrases as well.
I can differentiate "file does not exist" and error parsing.
/ Alexander Bokovoy
Freeipa-devel mailing list