Hello community,
here is the log from the commit of package yast2-network for openSUSE:Factory checked in at 2014-08-05 10:24:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-network (Old)
and /work/SRC/openSUSE:Factory/.yast2-network.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "yast2-network"
Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-network/yast2-network.changes 2014-07-23 22:05:41.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-network.new/yast2-network.changes 2014-08-05 10:24:26.000000000 +0200
@@ -1,0 +2,29 @@
+Mon Aug 4 06:22:20 UTC 2014 - mfilka@suse.com
+
+- bnc#889359
+ - Re-enable Add button in Overview dialog during installation
+- 3.1.75
+
+-------------------------------------------------------------------
+Mon Aug 4 05:36:41 UTC 2014 - mfilka@suse.com
+
+- bnc#884517
+ - fixed proposal when virtual machine proposal is selected
+ - /etc/hosts do not contain incorrect 0.0.0.0 entry
+- 3.1.74
+
+-------------------------------------------------------------------
+Fri Aug 1 14:15:49 UTC 2014 - ancor@suse.com
+
+- Avoid confusing firewall proposals by hidding the details (ssh
+ and vnc ports) when the firewall is disabled (bnc#886554).
+- 3.1.73
+
+-------------------------------------------------------------------
+Fri Aug 1 08:21:36 UTC 2014 - ancor@suse.com
+
+- Don't propose to enable the firewall if SuSEFirewall is not
+ selected for installation (bnc#881250)
+- 3.1.72
+
+-------------------------------------------------------------------
@@ -19 +48 @@
-- 3.1.89
+- 3.1.69
Old:
----
yast2-network-3.1.71.tar.bz2
New:
----
yast2-network-3.1.75.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-network.spec ++++++
--- /var/tmp/diff_new_pack.IjbVgg/_old 2014-08-05 10:24:27.000000000 +0200
+++ /var/tmp/diff_new_pack.IjbVgg/_new 2014-08-05 10:24:27.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-network
-Version: 3.1.71
+Version: 3.1.75
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ yast2-network-3.1.71.tar.bz2 -> yast2-network-3.1.75.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/.yardopts new/yast2-network-3.1.75/.yardopts
--- old/yast2-network-3.1.71/.yardopts 1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-network-3.1.75/.yardopts 2014-08-04 15:03:43.000000000 +0200
@@ -0,0 +1,6 @@
+--no-private
+--protected
+--markup markdown
+--output-dir doc/autodocs
+--readme README.md
+src/**/*.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/package/yast2-network.changes new/yast2-network-3.1.75/package/yast2-network.changes
--- old/yast2-network-3.1.71/package/yast2-network.changes 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/package/yast2-network.changes 2014-08-04 15:03:43.000000000 +0200
@@ -1,4 +1,33 @@
-------------------------------------------------------------------
+Mon Aug 4 06:22:20 UTC 2014 - mfilka@suse.com
+
+- bnc#889359
+ - Re-enable Add button in Overview dialog during installation
+- 3.1.75
+
+-------------------------------------------------------------------
+Mon Aug 4 05:36:41 UTC 2014 - mfilka@suse.com
+
+- bnc#884517
+ - fixed proposal when virtual machine proposal is selected
+ - /etc/hosts do not contain incorrect 0.0.0.0 entry
+- 3.1.74
+
+-------------------------------------------------------------------
+Fri Aug 1 14:15:49 UTC 2014 - ancor@suse.com
+
+- Avoid confusing firewall proposals by hidding the details (ssh
+ and vnc ports) when the firewall is disabled (bnc#886554).
+- 3.1.73
+
+-------------------------------------------------------------------
+Fri Aug 1 08:21:36 UTC 2014 - ancor@suse.com
+
+- Don't propose to enable the firewall if SuSEFirewall is not
+ selected for installation (bnc#881250)
+- 3.1.72
+
+-------------------------------------------------------------------
Tue Jul 22 14:30:00 CEST 2014 - locilka@suse.com
- Using new ServicesProposal library to set the sshd service status
@@ -16,7 +45,7 @@
- Do not restart network if the installation has been started
via a SSH connection. (bnc#885640)
-- 3.1.89
+- 3.1.69
-------------------------------------------------------------------
Fri Jul 11 08:52:08 UTC 2014 - mfilka@suse.com
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/package/yast2-network.spec new/yast2-network-3.1.75/package/yast2-network.spec
--- old/yast2-network-3.1.71/package/yast2-network.spec 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/package/yast2-network.spec 2014-08-04 15:03:43.000000000 +0200
@@ -17,7 +17,7 @@
Name: yast2-network
-Version: 3.1.71
+Version: 3.1.75
Release: 0
BuildRoot: %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/src/clients/firewall_stage1_proposal.rb new/yast2-network-3.1.75/src/clients/firewall_stage1_proposal.rb
--- old/yast2-network-3.1.71/src/clients/firewall_stage1_proposal.rb 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/src/clients/firewall_stage1_proposal.rb 2014-08-04 15:03:43.000000000 +0200
@@ -49,101 +49,20 @@
Yast.import "Linuxrc"
Yast.import "PackagesProposal"
Yast.import "ProductControl"
- Yast.import "ProductFeatures"
Yast.import "SuSEFirewall4Network"
Yast.import "SuSEFirewallProposal"
Yast.import "Wizard"
- # run this only once
- if !SuSEFirewallProposal.GetProposalInitialized
- # variables from control file
- Builtins.y2milestone(
- "Default firewall values: enable_firewall=%1, enable_ssh=%2 enable_sshd=%3",
- ProductFeatures.GetBooleanFeature("globals", "enable_firewall"),
- ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh"),
- ProductFeatures.GetBooleanFeature("globals", "enable_sshd")
- )
-
- SuSEFirewall4Network.SetEnabled1stStage(
- ProductFeatures.GetBooleanFeature("globals", "enable_firewall")
- )
-
- # we're installing over SSH, propose opening SSH port (bnc#535206)
- if Linuxrc.usessh
- SuSEFirewall4Network.SetSshEnabled1stStage(true)
- SuSEFirewall4Network.SetSshdEnabled(true)
- else
- SuSEFirewall4Network.SetSshEnabled1stStage(
- ProductFeatures.GetBooleanFeature("globals", "firewall_enable_ssh")
- )
- SuSEFirewall4Network.SetSshdEnabled(
- ProductFeatures.GetBooleanFeature("globals", "enable_sshd")
- )
- end
-
- # we're installing over VNC, propose opening VNC port (bnc#734264)
- SuSEFirewall4Network.SetVncEnabled1stStage(true) if Linuxrc.vnc
-
- SuSEFirewallProposal.SetProposalInitialized(true)
- end
-
-
@func = Convert.to_string(WFM.Args(0))
@param = Convert.to_map(WFM.Args(1))
@ret = {}
-
if @func == "MakeProposal"
- # Summary is visible only if installing over VNC
- # and if firewall is enabled - otherwise port could not be blocked
- vnc_proposal_element = ""
- if Linuxrc.vnc && SuSEFirewall4Network.Enabled1stStage
- vnc_proposal = SuSEFirewall4Network.EnabledVnc1stStage ?
- _("VNC ports will be open (close</a>)") %
- LINK_DISABLE_VNC
- : _("VNC ports will be blocked (open</a>)") %
- LINK_ENABLE_VNC
- vnc_proposal_element = "<li>#{vnc_proposal}</li>"
- end
-
- firewall_proposal = SuSEFirewall4Network.Enabled1stStage ?
- _(
- "Firewall will be enabled (disable</a>)"
- ) % LINK_DISABLE_FIREWALL
- :
- _(
- "Firewall will be disabled (enable</a>)"
- ) % LINK_ENABLE_FIREWALL
-
- ssh_proposal = SuSEFirewall4Network.EnabledSsh1stStage ?
- _(
- "SSH port will be open (block</a>)"
- ) % LINK_BLOCK_SSH_PORT
- :
- _(
- "SSH port will be blocked (open</a>)"
- ) % LINK_OPEN_SSH_PORT
-
- sshd_proposal = SuSEFirewall4Network.EnabledSshd ?
- _(
- "SSH service will be enabled (disable</a>)"
- ) % LINK_DISABLE_SSHD
- :
- _(
- "SSH service will be disabled (enable</a>)"
- ) % LINK_ENABLE_SSHD
-
-
-
-
- @output = "<ul>\n<li>#{firewall_proposal}</li>\n" +
- "<li>#{ssh_proposal}</li>\n" +
- "<li>#{sshd_proposal}</li>\n" +
- vnc_proposal_element +
- "</ul>\n"
+ # Don't override users settings
+ SuSEFirewall4Network.prepare_proposal unless SuSEFirewallProposal.GetChangedByUser
@ret = {
- "preformatted_proposal" => @output,
+ "preformatted_proposal" => preformatted_proposal,
"warning_level" => :warning,
"links" => [
LINK_ENABLE_FIREWALL,
@@ -368,6 +287,58 @@
Wizard.CloseDialog
Convert.to_symbol(dialog_ret)
end
+
+ private
+
+ def preformatted_proposal
+
+ firewall_proposal = SuSEFirewall4Network.Enabled1stStage ?
+ _(
+ "Firewall will be enabled (disable</a>)"
+ ) % LINK_DISABLE_FIREWALL
+ :
+ _(
+ "Firewall will be disabled (enable</a>)"
+ ) % LINK_ENABLE_FIREWALL
+
+ sshd_proposal = SuSEFirewall4Network.EnabledSshd ?
+ _(
+ "SSH service will be enabled (disable</a>)"
+ ) % LINK_DISABLE_SSHD
+ :
+ _(
+ "SSH service will be disabled (enable</a>)"
+ ) % LINK_ENABLE_SSHD
+
+ vnc_fw_proposal = nil
+ ssh_fw_proposal = nil
+ # It only makes sense to show the blocked ports if firewall is
+ # enabled (bnc#886554)
+ if SuSEFirewall4Network.Enabled1stStage
+ # Display vnc port only if installing over VNC
+ if Linuxrc.vnc
+ vnc_fw_proposal = SuSEFirewall4Network.EnabledVnc1stStage ?
+ _("VNC ports will be open (close</a>)") %
+ LINK_DISABLE_VNC
+ : _("VNC ports will be blocked (open</a>)") %
+ LINK_ENABLE_VNC
+ end
+
+ ssh_fw_proposal = SuSEFirewall4Network.EnabledSsh1stStage ?
+ _(
+ "SSH port will be open (block</a>)"
+ ) % LINK_BLOCK_SSH_PORT
+ :
+ _(
+ "SSH port will be blocked (open</a>)"
+ ) % LINK_OPEN_SSH_PORT
+ end
+
+ # Filter proposals with content and sort them
+ proposals = [firewall_proposal, ssh_fw_proposal, sshd_proposal, vnc_fw_proposal].compact
+ "<ul>\n" + proposals.map {|prop| "<li>#{prop}</li>\n" }.join + "</ul>\n"
+ end
+
end unless defined? FirewallStage1ProposalClient
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/src/clients/lan_auto.rb new/yast2-network-3.1.75/src/clients/lan_auto.rb
--- old/yast2-network-3.1.71/src/clients/lan_auto.rb 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/src/clients/lan_auto.rb 2014-08-04 15:03:43.000000000 +0200
@@ -159,8 +159,6 @@
@ret = deep_copy(@autoyast)
elsif @func == "Write"
@progress_orig = Progress.set(false)
- # Lan::PrepareForAutoinst();
- # Lan::Autoinstall();
@ret = Lan.WriteOnly
if Ops.get(LanItems.autoinstall_settings, "strict_IP_check_timeout") != nil
if Lan.isAnyInterfaceDown
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/src/include/network/lan/bridge.rb new/yast2-network-3.1.75/src/include/network/lan/bridge.rb
--- old/yast2-network-3.1.71/src/include/network/lan/bridge.rb 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/src/include/network/lan/bridge.rb 2014-08-04 15:03:43.000000000 +0200
@@ -51,6 +51,9 @@
nil
end
+ # Immediately updates device's ifcfg to be usable as bridge port.
+ #
+ # It mainly setups suitable BOOTPROTO an IP related values
def configure_as_bridge_port(device)
log.info("Adapt device #{device} as bridge port")
@@ -58,9 +61,20 @@
# can be set to BOOTPROTO=none. No workaround with
# BOOTPROTO=static required anymore
NetworkInterfaces.Edit(device)
+
NetworkInterfaces.Current["IPADDR"] = ""
NetworkInterfaces.Current["NETMASK"] = ""
NetworkInterfaces.Current["BOOTPROTO"] = "none"
+ #take out PREFIXLEN from old configuration (BNC#735109)
+ NetworkInterfaces.Current["PREFIXLEN"] = ""
+
+ # remove all aliases (bnc#590167)
+ aliases = NetworkInterfaces.Current["_aliases"] || {}
+ aliases.each do |alias_name, alias_ip|
+ NetworkInterfaces.DeleteAlias(device, alias_name) if alias_ip
+ end
+ NetworkInterfaces.Current["_aliases"] = {}
+
NetworkInterfaces.Commit
NetworkInterfaces.Add
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/src/include/network/lan/complex.rb new/yast2-network-3.1.75/src/include/network/lan/complex.rb
--- old/yast2-network-3.1.71/src/include/network/lan/complex.rb 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/src/include/network/lan/complex.rb 2014-08-04 15:03:43.000000000 +0200
@@ -575,11 +575,7 @@
def overview_buttons
ret = {}
- # User should be able to configure existing devices during installation.
- # This can be achieved via "Edit" button on automatically detected
- # devices. Advanced configuration should be postponed to installed system.
- # Therefor adding devices is not available during installation
- ret[:add] = Label.AddButton if !Mode.installation
+ ret[:add] = Label.AddButton
ret[:edit] = Label.EditButton
ret[:delete] = Label.DeleteButton
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/src/modules/Lan.rb new/yast2-network-3.1.75/src/modules/Lan.rb
--- old/yast2-network-3.1.71/src/modules/Lan.rb 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/src/modules/Lan.rb 2014-08-04 15:03:43.000000000 +0200
@@ -42,7 +42,6 @@
Yast.import "DNS"
Yast.import "NetHwDetection"
Yast.import "Host"
- Yast.import "Hostname"
Yast.import "IP"
Yast.import "Map"
Yast.import "Mode"
@@ -53,21 +52,18 @@
Yast.import "ProductFeatures"
Yast.import "Routing"
Yast.import "Progress"
- Yast.import "Service"
Yast.import "String"
- Yast.import "Summary"
Yast.import "SuSEFirewall4Network"
Yast.import "FileUtils"
Yast.import "PackageSystem"
Yast.import "LanItems"
Yast.import "ModuleLoading"
Yast.import "Linuxrc"
- Yast.import "Stage"
Yast.import "LanUdevAuto"
- Yast.import "Label"
Yast.include self, "network/complex.rb"
Yast.include self, "network/runtime.rb"
+ Yast.include self, "network/lan/bridge.rb"
#-------------
# GLOBAL DATA
@@ -891,29 +887,6 @@
nm_default && nm_installed
end
- # Create minimal ifcfgs for the case when NetworkManager is used:
- # NM does not need them but yast2-firewall and SuSEfirewall2 do
- # Avoid existing ifcfg from network installation
- def ProposeNMInterfaces
- Builtins.y2milestone("Minimal ifcfgs for NM")
- Builtins.foreach(LanItems.Items) do |number, lanitem|
- if IsNotEmpty(
- Ops.get_string(Convert.to_map(lanitem), ["hwinfo", "dev_name"], "")
- )
- LanItems.current = number
- if !LanItems.IsCurrentConfigured
- Builtins.y2milestone(
- "Nothing already configured start proposing %1 (NM)",
- LanItems.getCurrentItem
- )
- LanItems.ProposeItem
- end
- end
- end
-
- nil
- end
-
def IfcfgsToSkipVirtualizedProposal
skipped = []
Builtins.foreach(LanItems.Items) do |current, config|
@@ -1049,28 +1022,8 @@
"ETHTOOLS_OPTIONS"
)
if NetworkInterfaces.Commit
- NetworkInterfaces.Add
- NetworkInterfaces.Edit(ifcfg)
- Ops.set(old_config, "BOOTPROTO", "static")
- Ops.set(old_config, "IPADDR", "0.0.0.0/32")
- # remove all aliases (bnc#590167)
- Builtins.foreach(
- Ops.get_map(NetworkInterfaces.Current, "_aliases", {})
- ) do |a, v|
- if v != nil
- NetworkInterfaces.DeleteAlias(NetworkInterfaces.Name, a)
- end
- end
- #take out PREFIXLEN from old configuration (BNC#735109)
- Ops.set(old_config, "PREFIXLEN", "")
- Ops.set(old_config, "_aliases", {})
- Builtins.y2milestone(
- "Old Config with apllied changes %1\n%2",
- ifcfg,
- old_config
- )
- NetworkInterfaces.Current = deep_copy(old_config)
- NetworkInterfaces.Commit
+ # reconfigure existing device as newly created bridge's port
+ configure_as_bridge_port(ifcfg)
Ops.set(LanItems.Items, [current, "ifcfg"], new_ifcfg)
LanItems.modified = true
@@ -1087,215 +1040,8 @@
nil
end
- # Propose interface configuration
- # @return true if something was proposed
- def ProposeInterfaces
- Builtins.y2milestone("Hardware=%1", LanItems.Hardware)
-
- Builtins.y2milestone("NetworkConfig::Config=%1", NetworkConfig.Config)
- Builtins.y2milestone("NetworkConfig::DHCP=%1", NetworkConfig.DHCP)
-
- # test if we have any virtualization installed
- if !LanItems.nm_proposal_valid
- if UseNetworkManager()
- NetworkService.use_network_manager
- else
- NetworkService.use_netconfig
- end
-
- LanItems.nm_proposal_valid = true
- end
-
- if NetworkService.is_network_manager
- ProposeNMInterfaces()
-
- LanItems.modified = true # #144139 workaround
- Builtins.y2milestone("NM proposal")
- return true
- end
- # Something is already configured -> do nothing
- configured = false
- Builtins.foreach(LanItems.Items) do |number, lanitem|
- LanItems.current = number
- if LanItems.IsCurrentConfigured
- Builtins.y2milestone("Something already configured: don't propose.")
- configured = true
- raise Break
- end
- end
- return false if configured
-
-
- Builtins.foreach(LanItems.Items) do |number, lanitem|
- if IsNotEmpty(
- Ops.get_string(Convert.to_map(lanitem), ["hwinfo", "dev_name"], "")
- )
- LanItems.current = number
- link = Ops.get_boolean(
- LanItems.getCurrentItem,
- ["hwinfo", "link"],
- false
- )
- if Ops.get_string(LanItems.getCurrentItem, ["hwinfo", "type"], "") == "wlan"
- Builtins.y2warning("Will not propose wlan interfaces")
- else
- if !link
- Builtins.y2warning(
- "item number %1 has link:false detected",
- number
- )
- elsif !LanItems.IsCurrentConfigured && link
- Builtins.y2milestone(
- "Nothing already configured - start proposing"
- )
- LanItems.ProposeItem
- raise Break
- end
- end
- end
- end
-
- Builtins.y2milestone("NetworkConfig::Config=%1", NetworkConfig.Config)
- Builtins.y2milestone("NetworkConfig::DHCP=%1", NetworkConfig.DHCP)
-
- true
- end
-
- # Propose the hostname
- # See also DNS::Read
- # @return true if something was proposed
- def ProposeHostname
- if DNS.proposal_valid
- # the standalone hostname dialog did the job already
- return false
- end
-
- true
- end
-
- # Propose configuration for routing and resolver
- # @return true if something was proposed
- def ProposeRoutesAndResolver
- if LanItems.bootproto == "static" && LanItems.ipaddr != "" &&
- LanItems.ipaddr != nil
- ProposeHostname()
- end
- true
- end
-
- # Propose a configuration
- # @return true if something was proposed
- def Propose
- NetworkInterfaces.CleanCacheRead
- LanItems.Read
- ProposeInterfaces() && ProposeRoutesAndResolver()
- end
-
# Create a configuration for autoyast
# @return true if something was proposed
- def Autoinstall
- Builtins.y2milestone("Hardware=%1", LanItems.Hardware)
- tosel = nil
-
- # Some HW found -> use it for proposal
- if Ops.greater_than(Builtins.size(LanItems.Hardware), 0) &&
- Ops.greater_than(
- Builtins.size(
- Ops.get_list(LanItems.autoinstall_settings, "interfaces", [])
- ),
- 0
- )
- Builtins.foreach(
- Ops.get_list(LanItems.autoinstall_settings, "interfaces", [])
- ) do |interface|
- devs = NetworkInterfaces.List("")
- Builtins.y2milestone("devs: %1", devs)
- tosel = nil
- Add()
- tosel = LanItems.FindMatchingDevice(interface)
- Builtins.y2milestone("tosel=%1", tosel)
- # Read module data from autoyast
- aymodule = LanItems.GetModuleForInterface(
- Ops.get(interface, "device", ""),
- Ops.get_list(LanItems.autoinstall_settings, "modules", [])
- )
- if tosel != nil
- Ops.set(
- tosel,
- "module",
- Ops.get_string(aymodule, "module", "") != "" ?
- Ops.get_string(aymodule, "module", "") :
- Ops.get_string(tosel, "module", "")
- )
- Ops.set(
- tosel,
- "options",
- Ops.get_string(aymodule, "options", "") != "" ?
- Ops.get_string(aymodule, "options", "") :
- Ops.get_string(tosel, "options", "")
- )
-
- LanItems.SelectHWMap(tosel)
- else
- Builtins.y2milestone(
- "No hardware, no install.inf -> no autoinstallation possible."
- )
- next false
- end
- # The uppercasing is also done in lan_auto::FromAY
- # but the output goes to "devices" whereas here
- # we use "interfaces". FIXME.
- newk = nil
- interface = Builtins.mapmap(interface) do |k, v|
- newk = Builtins.toupper(k)
- { newk => v }
- end
- defaults = Builtins.union(
- LanItems.SysconfigDefaults,
- LanItems.GetDefaultsForHW
- )
- # Set interface variables
- LanItems.SetDeviceVars(interface, defaults)
- Builtins.y2debug(
- "ipaddr,bootproto=%1,%2",
- LanItems.ipaddr,
- LanItems.bootproto
- )
- if LanItems.bootproto == "static" && LanItems.ipaddr != "" &&
- LanItems.ipaddr != nil
- Builtins.y2milestone("static configuration")
-
- if LanItems.netmask == nil || LanItems.netmask == ""
- LanItems.netmask = "255.255.255.0"
- end
- end
- LanItems.Commit
- end
- else
- Builtins.y2milestone(
- "no interface configuration, taking it from install.inf"
- )
- ProposeInterfaces()
- end
-
- # #153426 - using ProposeInterfaces instead of Propose omitted these
- # if they are nonempty, Import has already taken care of them.
- if Ops.get_list(LanItems.autoinstall_settings, ["routing", "routes"], []) == []
- Builtins.y2milestone("gateway from install.inf")
- # Routing::ReadFromGateway (InstallInf["gateway"]:"");
- end
- if Ops.get_list(LanItems.autoinstall_settings, ["dns", "nameservers"], []) == []
- Builtins.y2milestone("nameserver from install.inf")
- # DNS::ReadNameserver (InstallInf["nameserver"]:"");
- end
- if Ops.get_string(LanItems.autoinstall_settings, ["dns", "hostname"], "") == ""
- ProposeHostname()
- end
-
- true
- end
-
-
# Check if any device is configured with DHCP.
# @return true if any DHCP device is configured
def AnyDHCPDevice
@@ -1317,13 +1063,6 @@
)
end
-
- def PrepareForAutoinst
- # ReadInstallInf();
- LanItems.ReadHw
- deep_copy(LanItems.Hardware)
- end
-
# @return [Array] of packages needed when writing the config
def Packages
pkgs = []
@@ -1435,12 +1174,7 @@
publish :function => :SummaryGeneral, :type => "list ()"
publish :function => :Add, :type => "boolean ()"
publish :function => :Delete, :type => "boolean ()"
- publish :function => :ProposeInterfaces, :type => "boolean ()"
- publish :function => :ProposeRoutesAndResolver, :type => "boolean ()"
- publish :function => :Propose, :type => "boolean ()"
- publish :function => :Autoinstall, :type => "boolean ()"
publish :function => :AnyDHCPDevice, :type => "boolean ()"
- publish :function => :PrepareForAutoinst, :type => "list <map> ()"
publish :function => :Packages, :type => "list <string> ()"
publish :function => :AutoPackages, :type => "map ()"
publish :function => :HaveXenBridge, :type => "boolean ()"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.71/src/modules/LanItems.rb new/yast2-network-3.1.75/src/modules/LanItems.rb
--- old/yast2-network-3.1.71/src/modules/LanItems.rb 2014-07-22 15:28:14.000000000 +0200
+++ new/yast2-network-3.1.75/src/modules/LanItems.rb 2014-08-04 15:03:43.000000000 +0200
@@ -24,6 +24,19 @@
require "yast"
module Yast
+ # Does way too many things.
+ #
+ # 1. Aggregates data about network interfaces, both configured
+ # and unconfigured, in {#Items}, which see.
+ #
+ # 2. Provides direct access to individual items of ifcfg files.
+ # For example BOOTPROTO and STARTMODE are accessible in
+ # {#bootproto} and {#startmode} (set via {#SetDeviceVars}
+ # via {#Select} or {#SetItem}).
+ #
+ # 3. ...
+ #
+
class LanItemsClass < Module
attr_reader :ipoib_modes
attr_accessor :ipoib_mode
@@ -1460,7 +1473,7 @@
end
# Select the hardware component
- # @param hw the component
+ # @param hardware the component
def SelectHWMap(hardware)
hardware = deep_copy(hardware)
sel = SelectHardwareMap(hardware)
@@ -2315,7 +2328,7 @@
DeleteItem()
end
- # Deletes the {current} item and its configuration
+ # Deletes the {#current} item and its configuration
def DeleteItem
return if @current < 0
return if @Items.nil? || @Items.empty?
@@ -2549,73 +2562,101 @@
result
end
- publish :variable => :Items, :type => "map