summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipa-install
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2008-01-11 10:36:25 +0000
committerMark McLoughlin <markmc@redhat.com>2008-01-11 10:36:25 +0000
commitbfb4564f9d9cc8e8a894b0fb9ac799a2da400e69 (patch)
tree45262be2db458637fd39b688b8b38711489c382f /ipa-server/ipa-install
parent29c42e853a47b8b727c036b73a2188e86fe434c2 (diff)
downloadfreeipa-bfb4564f9d9cc8e8a894b0fb9ac799a2da400e69.tar.gz
freeipa-bfb4564f9d9cc8e8a894b0fb9ac799a2da400e69.tar.xz
freeipa-bfb4564f9d9cc8e8a894b0fb9ac799a2da400e69.zip
Add service.is_running() helper
Add a simple helper to check whether a service is running and make ipa-server-install use it to check whether ntpd is running. Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Diffstat (limited to 'ipa-server/ipa-install')
-rw-r--r--ipa-server/ipa-install/ipa-server-install11
1 files changed, 1 insertions, 10 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index ee5e929d1..5f0879d73 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -239,15 +239,6 @@ def read_admin_password():
admin_password = read_password("IPA admin")
return admin_password
-def check_ntp():
- ret_code = 1
- p = subprocess.Popen(["/sbin/service", "ntpd", "status"], stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- stdout, stderr = p.communicate()
-
- return p.returncode
-
-
def main():
global ds
ds = None
@@ -452,7 +443,7 @@ def main():
print "\t This ticket will allow you to use the IPA tools (e.g., ipa-adduser)"
print "\t and the web user interface."
- if check_ntp() != 0:
+ if not service.is_running("ntpd"):
print "\t3. Kerberos requires time synchronization between clients"
print "\t and servers for correct operation. You should consider enabling ntpd."