From 7da22cf8c7f70f3bd2fb58479e64642e1099e336 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Tue, 19 May 2009 15:19:44 -0400 Subject: Enable the portmap or rpcbind service if the NIS service is enabled --- install/tools/ipa-nis-manage | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'install/tools/ipa-nis-manage') diff --git a/install/tools/ipa-nis-manage b/install/tools/ipa-nis-manage index 0325ca0a..3c06a7f2 100755 --- a/install/tools/ipa-nis-manage +++ b/install/tools/ipa-nis-manage @@ -80,6 +80,7 @@ def main(): retval = 0 loglevel = logging.NOTSET files=['/usr/share/ipa/nis.uldif'] + servicemsg = "" options, args = parse_options() if options.debug: @@ -120,6 +121,19 @@ def main(): print "%s" % e[0]['desc'] retval = 1 + # Enable either the portmap or rpcbind service + try: + ipautil.run(["/sbin/chkconfig", "portmap", "on"]) + servicemsg = "portmap" + except ipautil.CalledProcessError, e: + if e.returncode == 1: + try: + ipautil.run(["/sbin/chkconfig", "rpcbind", "on"]) + servicemsg = "rpcbind" + except ipautil.CalledProcessError, e: + print "Unable to enable either portmap or rpcbind" + retval = 3 + if entry is None: print "Enabling plugin" @@ -157,6 +171,9 @@ def main(): if retval == 0: print "This setting will not take effect until you restart Directory Server." + if args[0] == "enable": + print "The %s service may need to be started." % servicemsg + finally: if conn: conn.unbind() -- cgit