From 2876bd11dd2e2fc4fa25769d8df9407bf11689cd Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 6 May 2010 22:13:41 -0400 Subject: Check to see if we are configured before uninstalling. Allow the --force flag to override on both install and uninstall --- ipa-client/ipa-install/ipa-client-install | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ipa-client') diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 9d6d398e4..d7ee70d0b 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -172,6 +172,10 @@ def chkconfig(name, status): def uninstall(options): + if not fstore.has_files() and not options.force: + print "IPA client is not configured on this system." + return 1 + # Remove our host cert and CA cert if nickname_exists("IPA CA"): try: @@ -440,7 +444,7 @@ def main(): if options.uninstall: return uninstall(options) - if fstore.has_files(): + if fstore.has_files() and not options.force: print "IPA client is already configured on this system." return 1 -- cgit