summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-08-29 10:22:20 +0200
committerMartin Kosek <mkosek@redhat.com>2011-08-29 10:39:19 +0200
commit64c100947bd596d30716a9345743ccf376dd2a2d (patch)
tree4a4fe42f43de9f4e3e20b498f70a11f5ff2c6bfa /ipa-client/ipa-install/ipa-client-install
parente4b62d05294c6d00fddd1ad574085ddba1b887ee (diff)
downloadfreeipa-64c100947bd596d30716a9345743ccf376dd2a2d.tar.gz
freeipa-64c100947bd596d30716a9345743ccf376dd2a2d.tar.xz
freeipa-64c100947bd596d30716a9345743ccf376dd2a2d.zip
ipa-client-install breaks network configuration
Do not forget to add new line in updated /etc/sysconfig/network configuration. Move the actual change of the hostname after the user confirmation about proceeding with installation. It confused users when the hostname change occurred before this prompt. https://fedorahosted.org/freeipa/ticket/1724
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install10
1 files changed, 5 insertions, 5 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index fe4e1e4dd..64c5bf2c6 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -571,7 +571,7 @@ $)''', re.VERBOSE)
option, value = m.group('option', 'value')
if option is not None and option == 'HOSTNAME':
if value is not None and hostname != value:
- new_line = u'HOSTNAME=%s' % (hostname)
+ new_line = u"HOSTNAME=%s\n" % (hostname)
statestore.backup_state('network', 'hostname', value)
new_config.write(new_line)
new_config.flush()
@@ -779,10 +779,6 @@ def main():
if hostname != hostname.lower():
sys.exit('Invalid hostname \'%s\', must be lower-case.' % hostname)
- if options.hostname:
- # configure /etc/sysconfig/network to contain the hostname we set.
- backup_and_replace_hostname(fstore, options.hostname)
-
# Create the discovery instance
ds = ipadiscovery.IPADiscovery()
@@ -879,6 +875,10 @@ def main():
if not options.unattended and not user_input("Continue to configure the system with these values?", False):
return 1
+ if options.hostname:
+ # configure /etc/sysconfig/network to contain the hostname we set.
+ backup_and_replace_hostname(fstore, options.hostname)
+
if not options.unattended:
if options.principal is None and options.password is None and options.prompt_password is False:
options.principal = user_input("User authorized to enroll computers", allow_empty=False)