summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-adtrust-install
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2013-10-09 12:52:33 +0200
committerMartin Kosek <mkosek@redhat.com>2013-10-14 11:11:17 +0200
commit45e310ecc45bbf0c4656b3f46ad4aa659af928de (patch)
tree9b72d4e90270d5686915930bf2ccb481cdf1923a /install/tools/ipa-adtrust-install
parent4a95a50596fb86ce9de82b2c2a0517d3aa341950 (diff)
downloadfreeipa-45e310ecc45bbf0c4656b3f46ad4aa659af928de.tar.gz
freeipa-45e310ecc45bbf0c4656b3f46ad4aa659af928de.tar.xz
freeipa-45e310ecc45bbf0c4656b3f46ad4aa659af928de.zip
ipa-adtrust-install: Add warning that we will break existing samba configuration
In case /etc/samba/smb.conf exists and it was not created by ipa-adtrust-install, print a warning that we will break existing samba configuration and ask for a confirmation in the interactive mode. Part of: https://fedorahosted.org/freeipa/ticket/3479
Diffstat (limited to 'install/tools/ipa-adtrust-install')
-rwxr-xr-xinstall/tools/ipa-adtrust-install18
1 files changed, 15 insertions, 3 deletions
diff --git a/install/tools/ipa-adtrust-install b/install/tools/ipa-adtrust-install
index 2af2df92f..badb483ad 100755
--- a/install/tools/ipa-adtrust-install
+++ b/install/tools/ipa-adtrust-install
@@ -264,13 +264,25 @@ def main():
allow_empty = False):
sys.exit("Aborting installation.")
+ # Check if /etc/samba/smb.conf already exists. In case it was not generated
+ # by IPA, print a warning that we will break existing configuration.
+
if adtrustinstance.ipa_smb_conf_exists():
if not options.unattended:
- while True:
print "IPA generated smb.conf detected."
- if not ipautil.user_input("Overwrite smb.conf?", default = False, allow_empty = False):
+ if not ipautil.user_input("Overwrite smb.conf?",
+ default = False,
+ allow_empty = False):
sys.exit("Aborting installation.")
- break
+
+ elif os.path.exists('/etc/samba/smb.conf'):
+ print("WARNING: The smb.conf already exists. Running ipa-adtrust-install
+ "will break your existing samba configuration.\n\n")
+ if not options.unattended:
+ if not ipautil.user_input("Do you wish to continue?",
+ default = False,
+ allow_empty = False):
+ sys.exit("Aborting installation.")
if not options.unattended and not options.enable_compat:
options.enable_compat = enable_compat_tree()