Script 'mail_helper' called by ro Hello packager, This is just FYI. Your package was checked in in distribution "sle12" by autobuild-member: ro. Here comes the log... ---------------------------%<------------------------------ Hi, here is the log from ci_new_pac /mounts/work_src_done/SLE12/yast2-network -> sle12 ## BNC# 868187 : "ssh installation results in duplicate network route entries" (NEW/) ## BNC# 872089 : "/firewall_stage1_proposal.rb:31 warning: already initialized constant Yast::FirewallStage1ProposalClient::PROPOSAL_ID" (RESOLVED/FIXED) Changes: -------- --- /work/SRC/SUSE:SLE-12:GA/yast2-network/yast2-network.changes 2014-04-03 09:05:28.000000000 +0200 +++ /mounts/work_src_done/SLE12/yast2-network/yast2-network.changes 2014-04-07 11:39:51.000000000 +0200 @@ -1,0 +2,14 @@ +Fri Apr 4 13:12:27 UTC 2014 - mfilka@suse.com + +- bnc#868187 + - implemented heuristics for setting DHCLIENT_SET_DEFAULT_ROUTE + during autoconfiguration in installation +-3.1.46 + +------------------------------------------------------------------- +Fri Apr 4 12:41:36 UTC 2014 - jreidinger@suse.com + +- avoid client redefinition warning (bnc#872089) +- 3.1.45 + +------------------------------------------------------------------- calling whatdependson for sle12-i586 Packages directly triggered for rebuild: - yast2-network - at least 15 other packages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/SUSE:SLE-12:GA/yast2-network (Old) and /mounts/work_src_done/SLE12/yast2-network (BS:build ID:35586 MAIL:yast-commit@opensuse.org) (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "yast2-network", Maintainer is "yast-commit@opensuse.org" Old: ---- yast2-network-3.1.44.tar.bz2 New: ---- yast2-network-3.1.46.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-network.spec ++++++ --- /var/tmp/diff_new_pack.bD9P7W/_old 2014-04-09 17:10:56.000000000 +0200 +++ /var/tmp/diff_new_pack.bD9P7W/_new 2014-04-09 17:10:56.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.44 +Version: 3.1.46 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ yast2-network-3.1.44.tar.bz2 -> yast2-network-3.1.46.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/package/yast2-network.changes new/yast2-network-3.1.46/package/yast2-network.changes --- old/yast2-network-3.1.44/package/yast2-network.changes 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/package/yast2-network.changes 2014-04-07 11:33:54.000000000 +0200 @@ -1,4 +1,18 @@ ------------------------------------------------------------------- +Fri Apr 4 13:12:27 UTC 2014 - mfilka@suse.com + +- bnc#868187 + - implemented heuristics for setting DHCLIENT_SET_DEFAULT_ROUTE + during autoconfiguration in installation +-3.1.46 + +------------------------------------------------------------------- +Fri Apr 4 12:41:36 UTC 2014 - jreidinger@suse.com + +- avoid client redefinition warning (bnc#872089) +- 3.1.45 + +------------------------------------------------------------------- Wed Apr 2 13:22:18 UTC 2014 - mfilka@suse.com - bnc#869199 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/package/yast2-network.spec new/yast2-network-3.1.46/package/yast2-network.spec --- old/yast2-network-3.1.44/package/yast2-network.spec 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/package/yast2-network.spec 2014-04-07 11:33:54.000000000 +0200 @@ -17,7 +17,7 @@ Name: yast2-network -Version: 3.1.44 +Version: 3.1.46 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/src/clients/firewall_stage1_proposal.rb new/yast2-network-3.1.46/src/clients/firewall_stage1_proposal.rb --- old/yast2-network-3.1.44/src/clients/firewall_stage1_proposal.rb 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/src/clients/firewall_stage1_proposal.rb 2014-04-07 11:33:54.000000000 +0200 @@ -368,7 +368,7 @@ Wizard.CloseDialog Convert.to_symbol(dialog_ret) end - end + end unless defined? FirewallStage1ProposalClient end Yast::FirewallStage1ProposalClient.new.main diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/src/clients/inst_lan.rb new/yast2-network-3.1.46/src/clients/inst_lan.rb --- old/yast2-network-3.1.44/src/clients/inst_lan.rb 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/src/clients/inst_lan.rb 2014-04-07 11:33:55.000000000 +0200 @@ -35,18 +35,16 @@ def main Yast.import "UI" - Yast.import "Label" - Yast.import "Lan" - Yast.import "RichText" + Yast.import "LanItems" Yast.import "GetInstArgs" + Yast.include self, "network/lan/wizards.rb" + textdomain "network" log.info("----------------------------------------") log.info("Lan module started") - Yast.include self, "network/lan/cmdline.rb" - Yast.include self, "network/lan/wizards.rb" manual_conf_request = GetInstArgs.argmap["skip_detection"] || false log.info("Lan module forces manual configuration: #{manual_conf_request}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/src/clients/inst_setup_dhcp.rb new/yast2-network-3.1.46/src/clients/inst_setup_dhcp.rb --- old/yast2-network-3.1.44/src/clients/inst_setup_dhcp.rb 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/src/clients/inst_setup_dhcp.rb 2014-04-07 11:33:55.000000000 +0200 @@ -1,10 +1,12 @@ -Yast.import "LanItems" -Yast.import "NetworkInterfaces" #enclose client into own namespace to prevent messing global namespace module SetupDHCPClient + include Yast + Yast.import "LanItems" + Yast.import "NetworkInterfaces" + BASH_PATH = Path.new(".target.bash") def self.network_cards @@ -57,6 +59,9 @@ def self.activate_changes(devnames) return false if !write_configuration + # workaround for gh#yast/yast-core#74 (https://github.com/yast/yast-core/issues/74) + NetworkInterfaces.CleanCacheRead() + devnames.map { |d| reload_config(d) } end @@ -78,6 +83,42 @@ SCR.Execute(BASH_PATH, wicked_query) == 0 end + # Returns list of servers used for internet reachability test + # + # Basicaly servers with product release notes should be used. + def self.target_servers + ["scc.suse.com"] + end + + # Check if given device can reach some of reference servers + def self.set_default_route_flag_if_wan_dev?(devname) + set_default_route_flag(devname, "yes") + activate_changes([devname]) + + reached = target_servers.any? do |server| + ping_cmd = "ping -I #{devname} -c 3 #{server}" + SCR.Execute(BASH_PATH, ping_cmd) == 0 + end + + log.info("Release notes can be reached via #{devname}: #{reached}") + + if !reached + set_default_route_flag(devname, "no") + activate_changes([devname]) + end + + reached + end + + # Sets sysconfig's DHCLIENT_SET_DEFAULT_ROUTE option for given device + # + # @param [String] devname name of device as seen by system (e.g. enp0s3) + # @param [String] value "yes" or "no", as in sysconfig + def self.set_default_route_flag(devname, value) + item_id = LanItems.FindDeviceIndex(devname) + LanItems.SetItemSysconfigOpt(item_id, "DHCLIENT_SET_DEFAULT_ROUTE", value) + end + include Logger dhcp_cards = network_cards.select { |c| !configured?(c) } @@ -88,15 +129,26 @@ activate_changes(dhcp_cards) - # workaround for gh#yast/yast-core#74 (https://github.com/yast/yast-core/issues/74) - NetworkInterfaces.CleanCacheRead() - # drop devices without dhcp lease inactive_devices = dhcp_cards.select { |c| ! active_config?(c) } log.info "Inactive devices: #{inactive_devices}" inactive_devices.each { |c| delete_config(c) } - activate_changes(inactive_devices) + + # setup route flag + active_devices = dhcp_cards - inactive_devices + + if active_devices.size == 1 + # just one dhcp device, nothing to care of + set_default_route_flag(active_devices.first, "yes") + else + # try to find just one dhcp aware device for allowing default route + # if there is more than one dhcp devices enabled for setting default + # route (DHCLIENT_SET_DEFAULT_ROUTE = "yes"). bnc#868187 + active_devices.find { |d| set_default_route_flag_if_wan_dev?(d) } + end + + activate_changes(dhcp_cards) end :next diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/src/clients/lan.rb new/yast2-network-3.1.46/src/clients/lan.rb --- old/yast2-network-3.1.44/src/clients/lan.rb 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/src/clients/lan.rb 2014-04-07 11:33:55.000000000 +0200 @@ -194,14 +194,8 @@ } } - begin - @ret = CommandLine.Run(@cmdline) - Builtins.y2debug("ret=%1", @ret) - rescue Exception => e - Report.Error(_("Internal error. Please report a bug.")) - Builtins.y2internal("LanClient exception:") - Builtins.y2internal(e.backtrace.inspect) - end + @ret = CommandLine.Run(@cmdline) + Builtins.y2debug("ret=%1", @ret) # Finish Builtins.y2milestone("Lan module finished") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/src/include/network/lan/address.rb new/yast2-network-3.1.46/src/include/network/lan/address.rb --- old/yast2-network-3.1.44/src/include/network/lan/address.rb 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/src/include/network/lan/address.rb 2014-04-07 11:33:55.000000000 +0200 @@ -168,8 +168,6 @@ ) }, "IFCFGID" => - # "valid_chars": NetworkInterfaces::ValidCharsIfcfg (), - # "handle": HandleIfcfg, { "widget" => :textentry, # ComboBox label @@ -181,7 +179,6 @@ "TUNNEL" => { "widget" => :custom, "custom_widget" => VBox( - Left(CheckBox(Id(:persistent), _("Persistent Tunnel"))), HBox( InputField(Id(:owner), _("Tunnel owner")), InputField(Id(:group), _("Tunnel group")) @@ -758,11 +755,6 @@ def initTunnel(key) Builtins.y2internal("initTunnel %1", @settings) UI.ChangeWidget( - :persistent, - :Value, - Ops.get_string(@settings, "TUNNEL_SET_PERSISTENT", "") == "yes" - ) - UI.ChangeWidget( :owner, :Value, Ops.get_string(@settings, "TUNNEL_SET_OWNER", "") @@ -780,11 +772,6 @@ event = deep_copy(event) Ops.set( @settings, - "TUNNEL_SET_PERSISTENT", - Convert.to_boolean(UI.QueryWidget(:persistent, :Value)) ? "yes" : "no" - ) - Ops.set( - @settings, "TUNNEL_SET_OWNER", Convert.to_string(UI.QueryWidget(:owner, :Value)) ) @@ -1386,7 +1373,6 @@ "BOOTPROTO" => "static", "STARTMODE" => "auto", "TUNNEL" => LanItems.type, - "TUNNEL_SET_PERSISTENT" => LanItems.tunnel_set_persistent ? "yes" : "no", "TUNNEL_SET_OWNER" => LanItems.tunnel_set_owner, "TUNNEL_SET_GROUP" => LanItems.tunnel_set_group } @@ -1605,11 +1591,6 @@ elsif LanItems.type == "br" LanItems.bridge_ports = Ops.get_string(@settings, "BRIDGE_PORTS", "") elsif Builtins.contains(["tun", "tap"], LanItems.type) - LanItems.tunnel_set_persistent = Ops.get_string( - @settings, - "TUNNEL_SET_PERSISTENT", - "" - ) == "yes" LanItems.tunnel_set_owner = Ops.get_string( @settings, "TUNNEL_SET_OWNER", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/src/include/network/lan/complex.rb new/yast2-network-3.1.46/src/include/network/lan/complex.rb --- old/yast2-network-3.1.44/src/include/network/lan/complex.rb 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/src/include/network/lan/complex.rb 2014-04-07 11:33:55.000000000 +0200 @@ -511,6 +511,16 @@ when :add LanItems.AddNew Lan.Add + + # FIXME: This is for backward compatibility only + # dhclient needs to set just one dhcp enabled interface to + # DHCLIENT_SET_DEFAULT_ROUTE=yes. Otherwise interface is selected more + # or less randomly (bnc#868187). However, UI is not ready for such change yet. + # As it could easily happen that all interfaces are set to "no" (and + # default route is unrecheable in such case) this explicite setup was + # added. + LanItems.set_default_route = true + return :add when :edit if LanItems.IsCurrentConfigured @@ -543,6 +553,15 @@ return nil end + # FIXME: This is for backward compatibility only + # dhclient needs to set just one dhcp enabled interface to + # DHCLIENT_SET_DEFAULT_ROUTE=yes. Otherwise interface is selected more + # or less randomly (bnc#868187). However, UI is not ready for such change yet. + # As it could easily happen that all interfaces are set to "no" (and + # default route is unrecheable in such case) this explicite setup was + # added. + LanItems.set_default_route = true + if !DeviceReady( Ops.get_string( LanItems.getCurrentItem, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-network-3.1.44/src/modules/LanItems.rb new/yast2-network-3.1.46/src/modules/LanItems.rb --- old/yast2-network-3.1.44/src/modules/LanItems.rb 2014-04-02 16:23:21.000000000 +0200 +++ new/yast2-network-3.1.46/src/modules/LanItems.rb 2014-04-07 11:33:56.000000000 +0200 @@ -171,7 +171,6 @@ # for TUN / TAP devices - @tunnel_set_persistent = true @tunnel_set_owner = "" @tunnel_set_group = "" @@ -231,6 +230,7 @@ "REMOTE_IPADDR" => "", "NETMASK" => "", "MTU" => "", + "DHCLIENT_SET_DEFAULT_ROUTE" => "no", "LLADDR" => "00:00:00:00:00:00", "ETHTOOL_OPTIONS" => "", "NAME" => "", @@ -272,7 +272,6 @@ # defaults for tun/tap devices "TUNNEL_SET_OWNER" => "", "TUNNEL_SET_GROUP" => "", - "TUNNEL_SET_PERSISTENT" => "yes", # Infiniband # default mode for IPoIB devices suggested in fate#315501 "IPOIB_MODE" => "connected" @@ -376,6 +375,28 @@ GetDeviceMap(@current) end + # Sets item's sysconfig device map to given one + # + # It updates NetworkInterfaces according given map. Map is expected + # to be a hash where both key even value are strings + def SetDeviceMap(item_id, devmap) + devname = GetDeviceName(item_id) + return false if devname.nil? || devname.empty? + + NetworkInterfaces.Change2(devname, devmap, false) + end + + # Sets one option in items sysconfig device map + # + # Currently no checks on sysconfig option validity are performed + def SetItemSysconfigOpt(item_id, opt, value) + devmap = GetDeviceMap(item_id) + return false if devmap.nil? + + devmap[opt] = value + SetDeviceMap(item_id, devmap) + end + # Returns udev rule known for particular item def GetItemUdevRule(itemId) Ops.get_list(GetLanItem(itemId), ["udev", "net"], []) @@ -663,8 +684,8 @@ end def AddNew - @current = Builtins.size(@Items) - Ops.set(@Items, @current, { "commited" => false }) + @current = @Items.to_h.size + @Items[@current] = { "commited" => false } @operation = :add nil @@ -1582,6 +1603,7 @@ @prefix = GetDeviceVar(devmap, defaults, "PREFIXLEN") @remoteip = GetDeviceVar(devmap, defaults, "REMOTE_IPADDR") @netmask = GetDeviceVar(devmap, defaults, "NETMASK") + @set_default_route = GetDeviceVar(devmap, defaults, "DHCLIENT_SET_DEFAULT_ROUTE") == "yes" @mtu = GetDeviceVar(devmap, defaults, "MTU") @ethtool_options = GetDeviceVar(devmap, defaults, "ETHTOOL_OPTIONS") @@ -1606,11 +1628,6 @@ # tun/tap settings @tunnel_set_owner = GetDeviceVar(devmap, defaults, "TUNNEL_SET_OWNER") @tunnel_set_group = GetDeviceVar(devmap, defaults, "TUNNEL_SET_GROUP") - @tunnel_set_persistent = GetDeviceVar( - devmap, - defaults, - "TUNNEL_SET_PERSISTENT" - ) == "yes" # wireless options @wl_mode = GetDeviceVar(devmap, defaults, "WIRELESS_MODE") @@ -1836,218 +1853,219 @@ true end + # Sets device map items related to dhclient + def setup_dhclient_options(devmap) + devmap["DHCLIENT_SET_DEFAULT_ROUTE"] = @set_default_route ? "yes" : "no" if isCurrentDHCP + + return devmap + end + + # Sets device map items for device when it is not alias + def setup_basic_device_options(devmap) + return devmap if !@alias.empty? + + devmap["MTU"] = @mtu + devmap["ETHTOOL_OPTIONS"] = @ethtool_options + devmap["STARTMODE"] = @startmode + devmap["IFPLUGD_PRIORITY"] = @ifplugd_priority.to_i if @startmode == "ifplugd" + devmap["BOOTPROTO"] = @bootproto + devmap["_aliases"] = @aliases + + log.info("aliases #{@aliases}") + + devmap + end + # Commit pending operation # @return true if success def Commit - if @operation == :add || @operation == :edit - newdev = {} - - # #104494 - always write IPADDR+NETMASK, even empty - Ops.set(newdev, "IPADDR", @ipaddr) - if Ops.greater_than(Builtins.size(@prefix), 0) - Ops.set(newdev, "PREFIXLEN", @prefix) - else - Ops.set(newdev, "NETMASK", @netmask) - end - # #50955 omit computable fields - Ops.set(newdev, "BROADCAST", "") - Ops.set(newdev, "NETWORK", "") - - Ops.set(newdev, "REMOTE_IPADDR", @remoteip) - - # set LLADDR to sysconfig only for device on layer2 and only these which needs it - if @qeth_layer2 - busid = Ops.get_string(@Items, [@current, "hwinfo", "busid"], "") - # sysfs id has changed from css0... - sysfs_id = Ops.add("/devices/qeth/", busid) - Builtins.y2milestone("busid %1", busid) - if s390_device_needs_persistent_mac(sysfs_id, @Hardware) - Ops.set(newdev, "LLADDR", @qeth_macaddress) - end - end + if @operation != :add && @operation != :edit + Builtins.y2error("Unknown operation: %1", @operation) + raise ArgumentError, "Unknown operation: #{@operation}" + end - if @alias == "" - Ops.set(newdev, "MTU", @mtu) - Ops.set(newdev, "ETHTOOL_OPTIONS", @ethtool_options) - Ops.set(newdev, "STARTMODE", @startmode) - # it is not in Select yet because we don't have a widget for it - if @startmode == "ifplugd" - if @ifplugd_priority != nil - Ops.set(newdev, "IFPLUGD_PRIORITY", @ifplugd_priority) - else - Ops.set( - newdev, - "IFPLUGD_PRIORITY", - Ops.get(@ifplugd_priorities, @type, "0") - ) - end - end - Ops.set(newdev, "BOOTPROTO", @bootproto) - end - Ops.set(newdev, "NAME", @description) + newdev = {} - Ops.set(newdev, "DHCLIENT_SET_DOWN_LINK", "yes") if @hotplug == "pcmcia" + # #104494 - always write IPADDR+NETMASK, even empty + Ops.set(newdev, "IPADDR", @ipaddr) + if Ops.greater_than(Builtins.size(@prefix), 0) + Ops.set(newdev, "PREFIXLEN", @prefix) + else + Ops.set(newdev, "NETMASK", @netmask) + end + # #50955 omit computable fields + Ops.set(newdev, "BROADCAST", "") + Ops.set(newdev, "NETWORK", "") + Ops.set(newdev, "REMOTE_IPADDR", @remoteip) - case @type - when "bond" - i = 0 - Builtins.foreach(@bond_slaves) do |slave| - Ops.set(newdev, Builtins.sformat("BONDING_SLAVE%1", i), slave) - i = Ops.add(i, 1) - end + # set LLADDR to sysconfig only for device on layer2 and only these which needs it + if @qeth_layer2 + busid = Ops.get_string(@Items, [@current, "hwinfo", "busid"], "") + # sysfs id has changed from css0... + sysfs_id = Ops.add("/devices/qeth/", busid) + Builtins.y2milestone("busid %1", busid) + if s390_device_needs_persistent_mac(sysfs_id, @Hardware) + Ops.set(newdev, "LLADDR", @qeth_macaddress) + end + end - #assign nil to rest BONDING_SLAVEn to remove them - while Ops.less_than(i, @MAX_BOND_SLAVE) - Ops.set(newdev, Builtins.sformat("BONDING_SLAVE%1", i), nil) - i = Ops.add(i, 1) - end + newdev["NAME"] = @description - Ops.set(newdev, "BONDING_MODULE_OPTS", @bond_option) + newdev = setup_basic_device_options(newdev) + newdev = setup_dhclient_options(newdev) - #BONDING_MASTER always is yes - Ops.set(newdev, "BONDING_MASTER", "yes") + case @type + when "bond" + i = 0 + Builtins.foreach(@bond_slaves) do |slave| + Ops.set(newdev, Builtins.sformat("BONDING_SLAVE%1", i), slave) + i = Ops.add(i, 1) + end + + #assign nil to rest BONDING_SLAVEn to remove them + while Ops.less_than(i, @MAX_BOND_SLAVE) + Ops.set(newdev, Builtins.sformat("BONDING_SLAVE%1", i), nil) + i = Ops.add(i, 1) + end + + Ops.set(newdev, "BONDING_MODULE_OPTS", @bond_option) + + #BONDING_MASTER always is yes + Ops.set(newdev, "BONDING_MASTER", "yes") + + when "vlan" + Ops.set(newdev, "ETHERDEVICE", @vlan_etherdevice) + Ops.set(newdev, "VLAN_ID", @vlan_id) + + when "br" + Ops.set(newdev, "BRIDGE_PORTS", @bridge_ports) + Ops.set(newdev, "BRIDGE", "yes") + Ops.set(newdev, "BRIDGE_STP", "off") + Ops.set(newdev, "BRIDGE_FORWARDDELAY", "0") + + when "wlan" + Ops.set(newdev, "WIRELESS_MODE", @wl_mode) + Ops.set(newdev, "WIRELESS_ESSID", @wl_essid) + Ops.set(newdev, "WIRELESS_NWID", @wl_nwid) + Ops.set(newdev, "WIRELESS_AUTH_MODE", @wl_auth_mode) + Ops.set(newdev, "WIRELESS_WPA_PSK", @wl_wpa_psk) + Ops.set(newdev, "WIRELESS_KEY_LENGTH", @wl_key_length) + # obsoleted by WIRELESS_KEY_0 + Ops.set(newdev, "WIRELESS_KEY", "") # TODO: delete the varlable + Ops.set(newdev, "WIRELESS_KEY_0", Ops.get(@wl_key, 0, "")) + Ops.set(newdev, "WIRELESS_KEY_1", Ops.get(@wl_key, 1, "")) + Ops.set(newdev, "WIRELESS_KEY_2", Ops.get(@wl_key, 2, "")) + Ops.set(newdev, "WIRELESS_KEY_3", Ops.get(@wl_key, 3, "")) + Ops.set( + newdev, + "WIRELESS_DEFAULT_KEY", + Builtins.tostring(@wl_default_key) + ) + Ops.set(newdev, "WIRELESS_NICK", @wl_nick) + Ops.set(newdev, "WIRELESS_AP_SCANMODE", @wl_ap_scanmode) - when "vlan" - Ops.set(newdev, "ETHERDEVICE", @vlan_etherdevice) - Ops.set(newdev, "VLAN_ID", @vlan_id) - - when "br" - Ops.set(newdev, "BRIDGE_PORTS", @bridge_ports) - Ops.set(newdev, "BRIDGE", "yes") - Ops.set(newdev, "BRIDGE_STP", "off") - Ops.set(newdev, "BRIDGE_FORWARDDELAY", "0") - - when "wlan" - Ops.set(newdev, "WIRELESS_MODE", @wl_mode) - Ops.set(newdev, "WIRELESS_ESSID", @wl_essid) - Ops.set(newdev, "WIRELESS_NWID", @wl_nwid) - Ops.set(newdev, "WIRELESS_AUTH_MODE", @wl_auth_mode) - Ops.set(newdev, "WIRELESS_WPA_PSK", @wl_wpa_psk) - Ops.set(newdev, "WIRELESS_KEY_LENGTH", @wl_key_length) - # obsoleted by WIRELESS_KEY_0 - Ops.set(newdev, "WIRELESS_KEY", "") # TODO: delete the varlable - Ops.set(newdev, "WIRELESS_KEY_0", Ops.get(@wl_key, 0, "")) - Ops.set(newdev, "WIRELESS_KEY_1", Ops.get(@wl_key, 1, "")) - Ops.set(newdev, "WIRELESS_KEY_2", Ops.get(@wl_key, 2, "")) - Ops.set(newdev, "WIRELESS_KEY_3", Ops.get(@wl_key, 3, "")) + if @wl_wpa_eap != {} + Ops.set( + newdev, + "WIRELESS_EAP_MODE", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_MODE", "") + ) + Ops.set( + newdev, + "WIRELESS_WPA_IDENTITY", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_IDENTITY", "") + ) + Ops.set( + newdev, + "WIRELESS_WPA_PASSWORD", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_PASSWORD", "") + ) + Ops.set( + newdev, + "WIRELESS_WPA_ANONID", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_ANONID", "") + ) + Ops.set( + newdev, + "WIRELESS_CLIENT_CERT", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_CLIENT_CERT", "") + ) + Ops.set( + newdev, + "WIRELESS_CLIENT_KEY", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_CLIENT_KEY", "") + ) Ops.set( newdev, - "WIRELESS_DEFAULT_KEY", - Builtins.tostring(@wl_default_key) + "WIRELESS_CLIENT_KEY_PASSWORD", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_CLIENT_KEY_PASSWORD", "") ) - Ops.set(newdev, "WIRELESS_NICK", @wl_nick) - Ops.set(newdev, "WIRELESS_AP_SCANMODE", @wl_ap_scanmode) + Ops.set( + newdev, + "WIRELESS_CA_CERT", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_CA_CERT", "") + ) + Ops.set( + newdev, + "WIRELESS_EAP_AUTH", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_AUTH", "") + ) + Ops.set( + newdev, + "WIRELESS_PEAP_VERSION", + Ops.get_string(@wl_wpa_eap, "WPA_EAP_PEAP_VERSION", "") + ) + end - if @wl_wpa_eap != {} - Ops.set( - newdev, - "WIRELESS_EAP_MODE", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_MODE", "") - ) - Ops.set( - newdev, - "WIRELESS_WPA_IDENTITY", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_IDENTITY", "") - ) - Ops.set( - newdev, - "WIRELESS_WPA_PASSWORD", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_PASSWORD", "") - ) - Ops.set( - newdev, - "WIRELESS_WPA_ANONID", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_ANONID", "") - ) - Ops.set( - newdev, - "WIRELESS_CLIENT_CERT", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_CLIENT_CERT", "") - ) - Ops.set( - newdev, - "WIRELESS_CLIENT_KEY", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_CLIENT_KEY", "") - ) - Ops.set( - newdev, - "WIRELESS_CLIENT_KEY_PASSWORD", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_CLIENT_KEY_PASSWORD", "") - ) - Ops.set( - newdev, - "WIRELESS_CA_CERT", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_CA_CERT", "") - ) - Ops.set( - newdev, - "WIRELESS_EAP_AUTH", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_AUTH", "") - ) - Ops.set( - newdev, - "WIRELESS_PEAP_VERSION", - Ops.get_string(@wl_wpa_eap, "WPA_EAP_PEAP_VERSION", "") - ) - end + Ops.set(newdev, "WIRELESS_CHANNEL", @wl_channel) + Ops.set(newdev, "WIRELESS_FREQUENCY", @wl_frequency) + Ops.set(newdev, "WIRELESS_BITRATE", @wl_bitrate) + Ops.set(newdev, "WIRELESS_AP", @wl_accesspoint) + Ops.set(newdev, "WIRELESS_POWER", @wl_power ? "yes" : "no") - Ops.set(newdev, "WIRELESS_CHANNEL", @wl_channel) - Ops.set(newdev, "WIRELESS_FREQUENCY", @wl_frequency) - Ops.set(newdev, "WIRELESS_BITRATE", @wl_bitrate) - Ops.set(newdev, "WIRELESS_AP", @wl_accesspoint) - Ops.set(newdev, "WIRELESS_POWER", @wl_power ? "yes" : "no") - - when "ib" - newdev["IPOIB_MODE"] = @ipoib_mode + when "ib" + newdev["IPOIB_MODE"] = @ipoib_mode - end + end - if DriverType(@type) == "ctc" - if Ops.get(NetworkConfig.Config, "WAIT_FOR_INTERFACES") == nil || - Ops.less_than( - Ops.get_integer(NetworkConfig.Config, "WAIT_FOR_INTERFACES", 0), - 40 - ) - Ops.set(NetworkConfig.Config, "WAIT_FOR_INTERFACES", 40) - end + if DriverType(@type) == "ctc" + if Ops.get(NetworkConfig.Config, "WAIT_FOR_INTERFACES") == nil || + Ops.less_than( + Ops.get_integer(NetworkConfig.Config, "WAIT_FOR_INTERFACES", 0), + 40 + ) + Ops.set(NetworkConfig.Config, "WAIT_FOR_INTERFACES", 40) end + end - if @alias == "" - Ops.set(newdev, "_aliases", @aliases) - Builtins.y2milestone("aliases %1", @aliases) - end - if Builtins.contains(["tun", "tap"], @type) - newdev = { - "BOOTPROTO" => "static", - "STARTMODE" => "auto", - "TUNNEL" => @type, - "TUNNEL_SET_PERSISTENT" => @tunnel_set_persistent ? "yes" : "no", - "TUNNEL_SET_OWNER" => @tunnel_set_owner, - "TUNNEL_SET_GROUP" => @tunnel_set_group - } - end + if Builtins.contains(["tun", "tap"], @type) + newdev = { + "BOOTPROTO" => "static", + "STARTMODE" => "auto", + "TUNNEL" => @type, + "TUNNEL_SET_OWNER" => @tunnel_set_owner, + "TUNNEL_SET_GROUP" => @tunnel_set_group + } + end - # L3: bnc#585458 - # FIXME: INTERFACETYPE confuses sysconfig, bnc#458412 - # Only test when newdev has enough info for GetTypeFromIfcfg to work. - implied_type = NetworkInterfaces.GetTypeFromIfcfg(newdev) - if implied_type != nil && implied_type != @type - Ops.set(newdev, "INTERFACETYPE", @type) - end - - NetworkInterfaces.Name = Ops.get_string(@Items, [@current, "ifcfg"], "") - NetworkInterfaces.Current = deep_copy(newdev) - - # bnc#752464 - can leak wireless passwords - # useful only for debugging. Writes huge struct mostly filled by defaults. - Builtins.y2debug("%1", NetworkInterfaces.ConcealSecrets1(newdev)) + # L3: bnc#585458 + # FIXME: INTERFACETYPE confuses sysconfig, bnc#458412 + # Only test when newdev has enough info for GetTypeFromIfcfg to work. + implied_type = NetworkInterfaces.GetTypeFromIfcfg(newdev) + if implied_type != nil && implied_type != @type + Ops.set(newdev, "INTERFACETYPE", @type) + end + + NetworkInterfaces.Name = Ops.get_string(@Items, [@current, "ifcfg"], "") + NetworkInterfaces.Current = deep_copy(newdev) + + # bnc#752464 - can leak wireless passwords + # useful only for debugging. Writes huge struct mostly filled by defaults. + Builtins.y2debug("%1", NetworkInterfaces.ConcealSecrets1(newdev)) + + Ops.set(@Items, [@current, "ifcfg"], "") if !NetworkInterfaces.Commit - Ops.set(@Items, [@current, "ifcfg"], "") if !NetworkInterfaces.Commit - else - Builtins.y2error("Unknown operation: %1", @operation) - return false - end @modified = true @operation = nil true @@ -2493,6 +2511,7 @@ publish :variable => :ipaddr, :type => "string" publish :variable => :remoteip, :type => "string" publish :variable => :netmask, :type => "string" + publish :variable => :set_default_route, :type => "boolean" publish :variable => :prefix, :type => "string" publish :variable => :startmode, :type => "string" publish :variable => :ifplugd_priority, :type => "string" @@ -2534,7 +2553,6 @@ publish :variable => :qeth_chanids, :type => "string" publish :variable => :lcs_timeout, :type => "string" publish :variable => :aliases, :type => "map" - publish :variable => :tunnel_set_persistent, :type => "boolean" publish :variable => :tunnel_set_owner, :type => "string" publish :variable => :tunnel_set_group, :type => "string" publish :variable => :proposal_valid, :type => "boolean" continue with "q"... Checked in at Wed Apr 9 17:12:06 CEST 2014 by ro Remember to have fun... -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org