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 /ipa-client | |
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 'ipa-client')
-rwxr-xr-x | ipa-client/ipa-install/ipa-client-install | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install index 612bdc658..cdcc6ad29 100755 --- a/ipa-client/ipa-install/ipa-client-install +++ b/ipa-client/ipa-install/ipa-client-install @@ -451,16 +451,10 @@ def uninstall(options, env): if fstore.has_files(): root_logger.info("Restoring client configuration files") + ipaservices.restore_network_configuration(fstore, statestore) fstore.restore_all_files() - old_hostname = statestore.restore_state('network', 'hostname') - if old_hostname is not None and old_hostname != hostname: - try: - ipautil.run(['/bin/hostname', old_hostname]) - except CalledProcessError, e: - root_logger.error( - "Failed to set this machine's hostname to %s (%s).", - old_hostname, str(e)) + ipautil.restore_hostname(statestore) nscd = ipaservices.knownservices.nscd if nscd.is_installed(): |