Re: [Freeipa-devel] [PATCH] 605 use diff user for dogtag DS instance

2010-11-11 Thread Jakub Hrozek
On Mon, Nov 08, 2010 at 11:10:06AM -0500, Rob Crittenden wrote:
 Use a different user for the dogtag DS instance. This prevents an
 error during uninstall of trying to remove the dirsrv user when the
 dogtag DS instance is removed.
 
 I also added a ipactl stop to the beginning of the uninstall
 process. We will try to stop each service individually during
 uninstall but stopping them all first is cleaner. Its how I've been
 uninstalling for months now anything (ipactl stop 
 ipa-server-install --uninstall -U).
 
 ticket https://fedorahosted.org/freeipa/ticket/349
 
 rob

I tested this only on F13, as installing CA on F14 currently doesn't
work, but seems to work OK there..

Ack

Jakub

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH] 605 use diff user for dogtag DS instance

2010-11-08 Thread Rob Crittenden
Use a different user for the dogtag DS instance. This prevents an error 
during uninstall of trying to remove the dirsrv user when the dogtag DS 
instance is removed.


I also added a ipactl stop to the beginning of the uninstall process. We 
will try to stop each service individually during uninstall but stopping 
them all first is cleaner. Its how I've been uninstalling for months now 
anything (ipactl stop  ipa-server-install --uninstall -U).


ticket https://fedorahosted.org/freeipa/ticket/349

rob
From a0a63a231f44570f2f7de09e69c0edd5b2f339d6 Mon Sep 17 00:00:00 2001
From: Rob Crittenden rcrit...@redhat.com
Date: Mon, 8 Nov 2010 11:05:37 -0500
Subject: [PATCH] Use a different user for dogtag DS instance

Also shut down all services before starting uninstall.

ticket 349
---
 install/tools/ipa-server-install |9 -
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index af96dde..282d17a 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -380,6 +380,13 @@ def check_dirsrv(unattended):
 
 def uninstall():
 
+print Shutting down all IPA services
+try:
+(stdout, stderr, rc) = run([/usr/sbin/ipactl, stop], raiseonerr=False)
+except Exception, e:
+pass
+
+print Removing IPA client configuration
 try:
 (stdout, stderr, rc) = run([/usr/sbin/ipa-client-install, --on-master, --unattended, --uninstall], raiseonerr=False)
 if rc not in [0,2]:
@@ -678,7 +685,7 @@ def main():
 
 if options.external_cert_file is None:
 cs = cainstance.CADSInstance()
-cs.create_instance(ds_user, realm_name, host_name, domain_name, dm_password)
+cs.create_instance(pkisrv, realm_name, host_name, domain_name, dm_password)
 ca = cainstance.CAInstance()
 if external == 0:
 ca.configure_instance(pkiuser, host_name, dm_password, dm_password, subject_base=options.subject)
-- 
1.7.2.1

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel