ipa-nis-manage enable: change service name from 'portmap' to 'rpcbind'

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

Reviewed-By: Abhijeet Kasurde <akasurde@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Gabe
2016-05-03 21:33:33 -06:00
committed by Martin Basti
parent 865935739a
commit bede6c282e

View File

@@ -144,17 +144,16 @@ def main():
retval = 1
# Enable either the portmap or rpcbind service
try:
portmap = services.knownservices.portmap
rpcbind = services.knownservices.rpcbind
if portmap.is_installed():
portmap.enable()
servicemsg = portmap.service_name
except ipautil.CalledProcessError as cpe:
if cpe.returncode == 1:
try:
rpcbind = services.knownservices.rpcbind
elif rpcbind.is_installed():
rpcbind.enable()
servicemsg = rpcbind.service_name
except ipautil.CalledProcessError as cpe:
else:
print("Unable to enable either %s or %s" % (portmap.service_name, rpcbind.service_name))
retval = 3