mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Make enabling the autofs service more robust
This commit is contained in:
parent
1bf537db9e
commit
33fb949826
@ -154,14 +154,19 @@ def configure_autofs_sssd(fstore, statestore, autodiscover, options):
|
|||||||
except Exception, e:
|
except Exception, e:
|
||||||
sys.exit(e)
|
sys.exit(e)
|
||||||
|
|
||||||
if 'autofs' not in sssdconfig.list_services():
|
|
||||||
sssdconfig.new_service('autofs')
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sssdconfig.activate_service('autofs')
|
sssdconfig.new_service('autofs')
|
||||||
except SSSDConfig.NoServiceError:
|
except SSSDConfig.ServiceAlreadyExists:
|
||||||
print "Unable to activate the autofs service in SSSD config."
|
pass
|
||||||
root_logger.debug("Unable to activate the autofs service in SSSD config.")
|
except SSSDConfig.ServiceNotRecognizedError:
|
||||||
|
root_logger.error("Unable to activate the Autofs service in SSSD config.")
|
||||||
|
root_logger.info(
|
||||||
|
"Please make sure you have SSSD built with autofs support installed.")
|
||||||
|
root_logger.info(
|
||||||
|
"Configure autofs support manually in /etc/sssd/sssd.conf.")
|
||||||
|
sys.exit("Cannot create the autofs service in sssd.conf")
|
||||||
|
|
||||||
|
sssdconfig.activate_service('autofs')
|
||||||
|
|
||||||
domain = None
|
domain = None
|
||||||
for name in domains:
|
for name in domains:
|
||||||
|
Loading…
Reference in New Issue
Block a user