diff options
| author | Rob Crittenden <rcritten@redhat.com> | 2019-06-04 12:18:46 -0400 |
|---|---|---|
| committer | Florence Blanc-Renaud <flo@redhat.com> | 2019-06-07 11:24:45 +0200 |
| commit | c1c50650a7f359aa9fd77d4348c31169ca878003 (patch) | |
| tree | a90e47c9bc4416c6fd766dada332532ab0cb6835 /ipaclient | |
| parent | 1284bf1588877d3549ddc98e4762038b8740c72e (diff) | |
| download | freeipa-c1c50650a7f359aa9fd77d4348c31169ca878003.tar.gz freeipa-c1c50650a7f359aa9fd77d4348c31169ca878003.tar.xz freeipa-c1c50650a7f359aa9fd77d4348c31169ca878003.zip | |
Return 0 on uninstall when on_master for case of not installed
This is to suppress the spurious error message:
The ipa-client-install command failed.
when the client is not configured.
This is managed by allowing a ScriptError to return SUCCESS (0)
and have this ignored in log_failure().
https://pagure.io/freeipa/issue/7836
Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Diffstat (limited to 'ipaclient')
| -rw-r--r-- | ipaclient/install/client.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py index 8dca10d3a..9492ca418 100644 --- a/ipaclient/install/client.py +++ b/ipaclient/install/client.py @@ -3175,9 +3175,13 @@ def uninstall_check(options): fstore = sysrestore.FileStore(paths.IPA_CLIENT_SYSRESTORE) if not is_ipa_client_installed(fstore): + if options.on_master: + rval = SUCCESS + else: + rval = CLIENT_NOT_CONFIGURED raise ScriptError( "IPA client is not configured on this system.", - rval=CLIENT_NOT_CONFIGURED) + rval=rval) server_fstore = sysrestore.FileStore(paths.SYSRESTORE) if server_fstore.has_files() and not options.on_master: |
