From 023b87d0313a5b1bd8b90a3010e1309ca84fb62f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?= Date: Wed, 9 May 2018 11:38:36 +0100 Subject: [PATCH 1/2] Check the root filesystem instead of the destdir --- src/lib/network/clients/save_network.rb | 8 +++----- test/save_network_test.rb | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/network/clients/save_network.rb b/src/lib/network/clients/save_network.rb index 01c5d2551..7df92e02b 100644 --- a/src/lib/network/clients/save_network.rb +++ b/src/lib/network/clients/save_network.rb @@ -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( diff --git a/test/save_network_test.rb b/test/save_network_test.rb index 8d20f8263..5bd0cee26 100644 --- a/test/save_network_test.rb +++ b/test/save_network_test.rb @@ -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 @@ -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 From 848936d9088de53ae9621649ac4e4da0fa16035d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Knut=20Alejandro=20Anderssen=20Gonz=C3=A1lez?= Date: Wed, 9 May 2018 11:38:44 +0100 Subject: [PATCH 2/2] Bump version & changelog. --- package/yast2-network.changes | 8 ++++++++ package/yast2-network.spec | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package/yast2-network.changes b/package/yast2-network.changes index 1b5d258b6..635e55a19 100644 --- a/package/yast2-network.changes +++ b/package/yast2-network.changes @@ -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 diff --git a/package/yast2-network.spec b/package/yast2-network.spec index c0e36713e..b24a4bba3 100644 --- a/package/yast2-network.spec +++ b/package/yast2-network.spec @@ -17,7 +17,7 @@ Name: yast2-network -Version: 4.0.30 +Version: 4.0.31 Release: 0 BuildArch: noarch