diff options
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 4 | ||||
-rw-r--r-- | ipapython/sysrestore.py | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index a37914fd6..9d6d398e4 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -440,6 +440,10 @@ def main(): if options.uninstall: return uninstall(options) + if fstore.has_files(): + print "IPA client is already configured on this system." + return 1 + cli_domain = None cli_server = None cli_realm = None diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py index d3c7a5017..cad6c91f9 100644 --- a/ipapython/sysrestore.py +++ b/ipapython/sysrestore.py @@ -203,6 +203,14 @@ class FileStore: return True + def has_files(self): + """Return True or False if there are any files in the index + + Can be used to determine if a program is configured. + """ + + return len(self.files) > 0 + class StateFile: """A metadata file for recording system state which can be backed up and later restored. The format is something |