|
|
86baa9 |
From 8bbec6c72b759767bc19681aab9c3d3d9f091b6a Mon Sep 17 00:00:00 2001
|
|
|
86baa9 |
From: Fraser Tweedale <ftweedal@redhat.com>
|
|
|
86baa9 |
Date: Fri, 29 Mar 2019 16:04:20 +1100
|
|
|
86baa9 |
Subject: [PATCH] ipa-cert-fix: use customary exit statuses
|
|
|
86baa9 |
|
|
|
86baa9 |
It is customary to return 2 when IPA is not configured, and 1 when
|
|
|
86baa9 |
other required bits are not installed or configured. Update
|
|
|
86baa9 |
ipa-cert-fix exit statuses accordingly.
|
|
|
86baa9 |
|
|
|
86baa9 |
Part of: https://pagure.io/freeipa/issue/7885
|
|
|
86baa9 |
|
|
|
86baa9 |
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
|
|
|
86baa9 |
---
|
|
|
86baa9 |
ipaserver/install/ipa_cert_fix.py | 4 ++--
|
|
|
86baa9 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
86baa9 |
|
|
|
86baa9 |
diff --git a/ipaserver/install/ipa_cert_fix.py b/ipaserver/install/ipa_cert_fix.py
|
|
|
86baa9 |
index 3d9070eac1e7dc03840215dffeb4d73f4d3d0a47..c8ee51faea9092350c8a182ba55387ddd7b196d8 100644
|
|
|
86baa9 |
--- a/ipaserver/install/ipa_cert_fix.py
|
|
|
86baa9 |
+++ b/ipaserver/install/ipa_cert_fix.py
|
|
|
86baa9 |
@@ -71,11 +71,11 @@ class IPACertFix(AdminTool):
|
|
|
86baa9 |
def run(self):
|
|
|
86baa9 |
if not is_ipa_configured():
|
|
|
86baa9 |
print("IPA is not configured.")
|
|
|
86baa9 |
- return 0 # not really an error
|
|
|
86baa9 |
+ return 2
|
|
|
86baa9 |
|
|
|
86baa9 |
if not cainstance.is_ca_installed_locally():
|
|
|
86baa9 |
print("CA is not installed on this server.")
|
|
|
86baa9 |
- return 0 # not really an error
|
|
|
86baa9 |
+ return 1
|
|
|
86baa9 |
|
|
|
86baa9 |
try:
|
|
|
86baa9 |
ipautil.run(['pki-server', 'cert-fix', '--help'], raiseonerr=True)
|
|
|
86baa9 |
--
|
|
|
86baa9 |
2.20.1
|
|
|
86baa9 |
|