Skip to content

Commit

Permalink
remove invalid_hostname check (fate #319639)
Browse files Browse the repository at this point in the history
install system has been fixed with these 2 PRs:
openSUSE/linuxrc#108
openSUSE/installation-images#101
  • Loading branch information
wfeldt committed May 9, 2016
1 parent 78f7cfc commit 2353665
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions library/types/src/modules/Hostname.rb
Expand Up @@ -157,7 +157,7 @@ def MergeFQ(hostname, domain)
def CurrentFQ
hostname_data = SCR.Execute(path(".target.bash_output"), "hostname --fqdn")

if hostname_data["exit"] != 0 || invalid_hostname?(hostname_data["stdout"].to_s.strip)
if hostname_data["exit"] != 0
Builtins.y2warning("Using fallback hostname")

fqhostname = SCR.Read(path(".target.string"), "/etc/hostname") || ""
Expand Down Expand Up @@ -227,18 +227,6 @@ def CurrentDomain
publish function: :CurrentFQ, type: "string ()"
publish function: :CurrentHostname, type: "string ()"
publish function: :CurrentDomain, type: "string ()"

private

# It checks if the hostname cannot be used for setting default fqdn
#
# FIXME: Hotfix for bnc#946047. This should be dropped as part of fate#319639
# implementation
#
# Basicaly, linuxrc sometimes resolves IP when querying "hostname --fqdn"
def invalid_hostname?(hostname)
Stage.initial && IP.Check(hostname)
end
end

Hostname = HostnameClass.new
Expand Down

0 comments on commit 2353665

Please sign in to comment.