Skip to content

Commit

Permalink
Merge branch 'SLE-15-GA' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
teclator committed May 9, 2018
2 parents 4fc4e1e + aeacd10 commit b1f8095
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
8 changes: 8 additions & 0 deletions package/yast2-network.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed May 9 10:35:36 UTC 2018 - knut.anderssen@suse.com

- Fix the check for adjusting ifcfg configuration in case of
network based root filesystem when saving the network at the end
of the installation (bsc#1090752).
- 4.0.31

-------------------------------------------------------------------
Wed Apr 25 08:31:35 UTC 2018 - knut.anderssen@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-network.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-network
Version: 4.0.30
Version: 4.0.31
Release: 0
BuildArch: noarch

Expand Down
8 changes: 3 additions & 5 deletions src/lib/network/clients/save_network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,14 @@ def adjust_for_network_disks(file)
# storage-ng
# Check if installation is targeted to a remote destination.
devicegraph = Y2Storage::StorageManager.instance.staging
is_disk_in_network = devicegraph.filesystem_in_network?(
Installation.destdir
)
is_disk_in_network = devicegraph.filesystem_in_network?("/")

if !is_disk_in_network
log.info("Directory \"#{Installation.destdir}\" is not on a network based device")
log.info("Root filesystem is not on a network based device")
return
end

log.info("Directory \"#{Installation.destdir}\" is on a network based device")
log.info("Root filesystem is on a network based device")

# tune ifcfg file for remote filesystem
SCR.Execute(
Expand Down
6 changes: 3 additions & 3 deletions test/save_network_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
Y2Storage::StorageManager.create_test_instance

staging = Y2Storage::StorageManager.instance.staging
allow(staging).to receive(:filesystem_in_network?).and_return(in_network)
allow(staging).to receive(:filesystem_in_network?).with("/").and_return(in_network)
allow(subject).to receive(:save_network)
# Mainly for import
subject.main
end

context "when installation directory is in a network device" do
context "when the root filesystem of the target system is in a network device" do
let(:in_network) { true }

it "tunes ifcfg file for remote filesystem" do
Expand All @@ -38,7 +38,7 @@
end
end

context "when installation directory is in a local device" do
context "when the root filesystem of the target system is in a local device" do
let(:in_network) { false }

it "does not touch any configuration file" do
Expand Down

0 comments on commit b1f8095

Please sign in to comment.