From 9d8ac395c00e48c95f8fdccbc05d43dd144f82ad Mon Sep 17 00:00:00 2001 From: Martin Babinsky Date: Tue, 19 May 2015 13:01:27 +0200 Subject: do not check for directory manager password during KRA uninstall ipa-kra-install validates and asks for directory manager password during uninstallation phase. Since this password is never used during service uninstall, the uninstaller will not perform these checks anymore. https://fedorahosted.org/freeipa/ticket/5028 Reviewed-By: Martin Basti --- ipaserver/install/ipa_kra_install.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'ipaserver/install/ipa_kra_install.py') diff --git a/ipaserver/install/ipa_kra_install.py b/ipaserver/install/ipa_kra_install.py index 099737fa9..386da286a 100644 --- a/ipaserver/install/ipa_kra_install.py +++ b/ipaserver/install/ipa_kra_install.py @@ -74,26 +74,9 @@ class KRAInstall(admintool.AdminTool): installutils.check_server_configuration() - if self.options.unattended and self.options.password is None: - self.option_parser.error( - "Directory Manager password must be specified using -p" - " in unattended mode" - ) - api.bootstrap(in_server=True) api.finalize() - def ask_for_options(self): - super(KRAInstall, self).ask_for_options() - - if not self.options.password: - self.options.password = installutils.read_password( - "Directory Manager", confirm=False, - validate=False, retry=False) - if self.options.password is None: - raise admintool.ScriptError( - "Directory Manager password required") - @classmethod def get_command_class(cls, options, args): if options.uninstall: @@ -152,6 +135,12 @@ class KRAInstaller(KRAInstall): def validate_options(self, needs_root=True): super(KRAInstaller, self).validate_options(needs_root=True) + if self.options.unattended and self.options.password is None: + self.option_parser.error( + "Directory Manager password must be specified using -p" + " in unattended mode" + ) + dogtag_version = int(api.env.dogtag_version) enable_kra = api.env.enable_kra @@ -187,6 +176,17 @@ class KRAInstaller(KRAInstall): self.option_parser.error("Too many parameters provided. " "No replica file is required.") + def ask_for_options(self): + super(KRAInstaller, self).ask_for_options() + + if not self.options.unattended and self.options.password is None: + self.options.password = installutils.read_password( + "Directory Manager", confirm=False, + validate=False, retry=False) + if self.options.password is None: + raise admintool.ScriptError( + "Directory Manager password required") + def _run(self): super(KRAInstaller, self).run() print dedent(self.INSTALLER_START_MESSAGE) -- cgit