mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Remove deprecated hostname restoration from Fedora18
This is not needed on new Fedora, because restore will not be effective. https://fedorahosted.org/freeipa/ticket/5794 Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
parent
c5686295f1
commit
30f3d198d0
@ -2502,9 +2502,8 @@ def install(options, env, fstore, statestore):
|
||||
cli_realm, paths.KRB5_KEYTAB))
|
||||
|
||||
if options.hostname and not options.on_master:
|
||||
# configure /etc/sysconfig/network to contain the hostname we set.
|
||||
# skip this step when run by ipa-server-install as it always configures
|
||||
# hostname if different from system hostname
|
||||
# hostname
|
||||
tasks.backup_and_replace_hostname(fstore, statestore, options.hostname)
|
||||
|
||||
ntp_srv_servers = []
|
||||
|
@ -118,8 +118,6 @@ class BasePathNamespace(object):
|
||||
SYSCONFIG_HTTPD = "/etc/sysconfig/httpd"
|
||||
SYSCONFIG_KRB5KDC_DIR = "/etc/sysconfig/krb5kdc"
|
||||
SYSCONFIG_NAMED = "/etc/sysconfig/named"
|
||||
SYSCONFIG_NETWORK = "/etc/sysconfig/network"
|
||||
SYSCONFIG_NETWORK_IPABKP = "/etc/sysconfig/network.ipabkp"
|
||||
SYSCONFIG_NFS = "/etc/sysconfig/nfs"
|
||||
SYSCONFIG_NTPD = "/etc/sysconfig/ntpd"
|
||||
SYSCONFIG_ODS = "/etc/sysconfig/ods"
|
||||
|
@ -343,7 +343,6 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
statestore.backup_state('network', 'hostname', old_hostname)
|
||||
|
||||
def restore_hostname(self, fstore, statestore):
|
||||
old_filepath = paths.SYSCONFIG_NETWORK
|
||||
old_hostname = statestore.get_state('network', 'hostname')
|
||||
|
||||
if old_hostname is not None:
|
||||
@ -356,15 +355,6 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
old_hostname, e
|
||||
)
|
||||
|
||||
if fstore.has_file(old_filepath):
|
||||
# This is Fedora >=18 instance that was upgraded from previous
|
||||
# Fedora version which held network configuration
|
||||
# in /etc/sysconfig/network
|
||||
old_filepath_restore = paths.SYSCONFIG_NETWORK_IPABKP
|
||||
fstore.restore_file(old_filepath, old_filepath_restore)
|
||||
print("Deprecated configuration file '%s' was restored to '%s'" \
|
||||
% (old_filepath, old_filepath_restore))
|
||||
|
||||
filepath = paths.ETC_HOSTNAME
|
||||
if fstore.has_file(filepath):
|
||||
fstore.restore_file(filepath)
|
||||
|
Loading…
Reference in New Issue
Block a user