diff options
author | Rob Crittenden <rcritten@redhat.com> | 2009-05-19 15:19:44 -0400 |
---|---|---|
committer | Jason Gerard DeRose <jderose@redhat.com> | 2009-05-21 14:51:04 -0600 |
commit | 7da22cf8c7f70f3bd2fb58479e64642e1099e336 (patch) | |
tree | ec0be99c2c3a796eebfb9cfc8d543809107e0edd /install/tools/ipa-nis-manage | |
parent | fe012f4ff258bdfc25bc61b3861eb75c34a6e821 (diff) | |
download | freeipa-7da22cf8c7f70f3bd2fb58479e64642e1099e336.tar.gz freeipa-7da22cf8c7f70f3bd2fb58479e64642e1099e336.tar.xz freeipa-7da22cf8c7f70f3bd2fb58479e64642e1099e336.zip |
Enable the portmap or rpcbind service if the NIS service is enabled
Diffstat (limited to 'install/tools/ipa-nis-manage')
-rwxr-xr-x | install/tools/ipa-nis-manage | 17 |
1 files changed, 17 insertions, 0 deletions
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() |