summaryrefslogtreecommitdiffstats
path: root/ipa-client
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-04-27 16:09:43 +0200
committerMartin Kosek <mkosek@redhat.com>2011-04-29 09:28:37 +0200
commit2e99c60c8b21723f86f86bedf1c37c51789f7bc8 (patch)
tree1da8afdf5684e659a4dcbe6489e86f382c02a824 /ipa-client
parent7811200c628696fd42762da835c565b4515505ac (diff)
downloadfreeipa-2e99c60c8b21723f86f86bedf1c37c51789f7bc8.tar.gz
freeipa-2e99c60c8b21723f86f86bedf1c37c51789f7bc8.tar.xz
freeipa-2e99c60c8b21723f86f86bedf1c37c51789f7bc8.zip
Forbid reinstallation in ipa-client-install
The --force option may be misused to reinstall an existing IPA client. This is not supported and may lead to unexpected errors. When required, the cleanest way to re-install IPA client is to run uninstall and then install again. This patch also includes few cosmetic changes in messages to user to provide more consistent user experience with the script. https://fedorahosted.org/freeipa/ticket/1117
Diffstat (limited to 'ipa-client')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install15
1 files changed, 8 insertions, 7 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 587169ada..74b713020 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -58,7 +58,7 @@ def parse_options():
parser.add_option("--server", dest="server", help="IPA server")
parser.add_option("--realm", dest="realm_name", help="realm name")
parser.add_option("-f", "--force", dest="force", action="store_true",
- default=False, help="force setting of ldap/kerberos conf")
+ default=False, help="force setting of LDAP/Kerberos conf")
parser.add_option("-d", "--debug", dest="debug", action="store_true",
default=False, help="print debugging information")
parser.add_option("-U", "--unattended", dest="unattended",
@@ -185,7 +185,7 @@ def chkconfig(name, status):
def uninstall(options, env):
- if not fstore.has_files() and not options.force:
+ if not fstore.has_files():
print "IPA client is not configured on this system."
return 2
@@ -271,11 +271,11 @@ def uninstall(options, env):
except:
print "Failed to clean up /etc/krb5.keytab"
- print "Disabling client Kerberos and Ldap configurations"
+ print "Disabling client Kerberos and LDAP configurations"
try:
run(["/usr/sbin/authconfig", "--disableldap", "--disablekrb5", "--disablesssd", "--disablesssdauth", "--disablemkhomedir", "--update"])
except Exception, e:
- print "Failed to remove krb5/ldap configuration. " +str(e)
+ print "Failed to remove krb5/LDAP configuration. " +str(e)
sys.exit(1)
print "Restoring client configuration files"
@@ -572,7 +572,7 @@ def configure_sssd_conf(fstore, cli_realm, cli_domain, cli_server, options):
return 0
def resolve_ipaddress(server):
- """ Connect to the server's ldap port in order to determine what ip
+ """ Connect to the server's LDAP port in order to determine what ip
address this machine uses as "public" ip (relative to the server).
"""
@@ -685,8 +685,9 @@ def main():
if options.uninstall:
return uninstall(options, env)
- if fstore.has_files() and not options.force:
- sys.exit("IPA client is already configured on this system.")
+ if fstore.has_files():
+ sys.exit("IPA client is already configured on this system.\n"
+ + "If you want to reinstall the IPA client please uninstall it first.")
cli_domain = None
cli_server = None