diff options
author | Martin Kosek <mkosek@redhat.com> | 2012-12-05 10:50:05 +0100 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2012-12-05 13:30:31 +0100 |
commit | 3896bf370a142eb95a4341e381ee7b1ff0f0c3e2 (patch) | |
tree | f6f803315b928cd73d9c2115a93ee0f593d252f7 /install/tools | |
parent | c6efd4c7aaf6961142b6fae5d30dd9691a493447 (diff) | |
download | freeipa-3896bf370a142eb95a4341e381ee7b1ff0f0c3e2.tar.gz freeipa-3896bf370a142eb95a4341e381ee7b1ff0f0c3e2.tar.xz freeipa-3896bf370a142eb95a4341e381ee7b1ff0f0c3e2.zip |
Change network configuration file
Fedora+systemd changed deprecated /etc/sysconfig/network which was
used by IPA to store static hostname for the IPA machine. See
https://bugzilla.redhat.com/show_bug.cgi?id=881785 for details.
Change Fedora platform files to store the hostname to /etc/hostname
instead.
https://fedorahosted.org/freeipa/ticket/3279
Diffstat (limited to 'install/tools')
-rwxr-xr-x | install/tools/ipa-server-install | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 35b65f662..92e9dcf2f 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -497,6 +497,7 @@ def uninstall(): krbinstance.KrbInstance(fstore).uninstall() dsinstance.DsInstance(fstore=fstore).uninstall() memcacheinstance.MemcacheInstance().uninstall() + ipaservices.restore_network_configuration(fstore, sstore) fstore.restore_all_files() try: os.remove(ANSWER_CACHE) @@ -510,13 +511,7 @@ def uninstall(): ipaservices.knownservices.ipa.disable() - old_hostname = sstore.restore_state('network','hostname') - system_hostname = get_fqdn() - if old_hostname is not None and old_hostname != system_hostname: - try: - ipautil.run(['/bin/hostname', old_hostname]) - except CalledProcessError, e: - print >>sys.stderr, "Failed to set this machine hostname back to %s (%s)." % (old_hostname, str(e)) + ipautil.restore_hostname(sstore) # remove upgrade state file sysupgrade.remove_upgrade_file() |