Skip to content

Commit

Permalink
Merge pull request #1107 from yast/merge_SLE-15-SP2
Browse files Browse the repository at this point in the history
Merge SLE-15-SP2 into master
  • Loading branch information
teclator committed Sep 21, 2020
2 parents 9311171 + c7f5ae6 commit f36ec11
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions package/yast2-network.changes
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Sep 21 07:58:22 UTC 2020 - Knut Anderssen <kanderssen@suse.com>

- Fix connection hostname initialization (bsc#1175579)
- 4.3.21

-------------------------------------------------------------------
Tue Sep 15 19:51:36 UTC 2020 - Knut Anderssen <kanderssen@suse.com>

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-network.spec
Expand Up @@ -17,7 +17,7 @@


Name: yast2-network
Version: 4.3.20
Version: 4.3.21
Release: 0
Summary: YaST2 - Network Configuration
License: GPL-2.0-only
Expand Down
Expand Up @@ -129,7 +129,9 @@ def hostname(conn)
return nil unless conn.ip

Yast::Host.Read
Yast::Host.names(conn.ip.address.address.to_s).first
aliases = Yast::Host.names(conn.ip.address.address.to_s).first
# Use the fqdn when defined
aliases.to_s.split(" ").first
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/data/scr_read/etc/hosts
@@ -1,2 +1,2 @@
127.0.0.1 localhost
192.168.123.1 foo
192.168.123.1 foo.example.com foo
Expand Up @@ -71,7 +71,7 @@
context "and a hostname is specified" do
it "sets the hostname" do
eth = handler.connection_config
expect(eth.hostname).to eq("foo")
expect(eth.hostname).to eq("foo.example.com")
end
end

Expand Down

0 comments on commit f36ec11

Please sign in to comment.