[Freeipa-devel] [PATCH] Make enabling the autofs service more robust
Jakub Hrozek
jhrozek at redhat.com
Mon Oct 29 16:21:57 UTC 2012
An improvement based on Honza's suggestion.
-------------- next part --------------
>From e01cf49e88898acf1ec8695f40538a4e6d6c14be Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Mon, 29 Oct 2012 10:06:45 +0100
Subject: [PATCH] Make enabling the autofs service more robust
---
ipa-client/ipa-install/ipa-client-automount | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/ipa-client/ipa-install/ipa-client-automount b/ipa-client/ipa-install/ipa-client-automount
index 182f9f659dc3bfca198fc254f1a51047b3d9d31f..8d46449f9ed48f20813f9528d3ee1f537355b480 100755
--- a/ipa-client/ipa-install/ipa-client-automount
+++ b/ipa-client/ipa-install/ipa-client-automount
@@ -154,8 +154,16 @@ def configure_autofs_sssd(fstore, statestore, autodiscover, options):
except Exception, e:
sys.exit(e)
- if 'autofs' not in sssdconfig.list_services():
+ try:
sssdconfig.new_service('autofs')
+ except SSSDConfig.ServiceAlreadyExists:
+ pass
+ 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.")
try:
sssdconfig.activate_service('autofs')
--
1.7.12.1
More information about the Freeipa-devel
mailing list