Skip to content

Commit

Permalink
Merge pull request #451 from teclator/merge_SLE12_SP2
Browse files Browse the repository at this point in the history
Merge changes from SLE12-SP2 (#449)
  • Loading branch information
teclator committed Oct 10, 2016
2 parents 30a0fde + bd0a8da commit 9888c9e
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 29 deletions.
13 changes: 13 additions & 0 deletions package/yast2-network.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Oct 7 15:16:11 UTC 2016 - kanderssen@suse.com

- If an interface is not configured yet then just set the interface
link, the backend should handle at least the up event.
(bsc#991694)
- 3.2.3

-------------------------------------------------------------------
Fri Oct 7 15:12:05 UTC 2016 - ancor@suse.com

- Extra space in the remote administration dialog (bsc#988904)

-------------------------------------------------------------------
Thu Oct 6 09:22:25 UTC 2016 - mfilka@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: 3.2.2
Version: 3.2.3
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
2 changes: 1 addition & 1 deletion src/clients/inst_netprobe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def main

if NetHwDetection.running
# Start interfaces iff running installation. See bnc#395014, bnc#782283 and bnc#792985
SetAllIfacesUp()
SetAllLinksUp()
end

Builtins.y2milestone(
Expand Down
2 changes: 2 additions & 0 deletions src/include/network/remote/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ def RemoteMainDialog

allow_buttons = RadioButtonGroup(
VBox(
# Small spacing (bsc#988904)
VSpacing(0.3),
# RadioButton label
Left(
RadioButton(
Expand Down
51 changes: 24 additions & 27 deletions src/include/network/routines.rb
Original file line number Diff line number Diff line change
Expand Up @@ -722,44 +722,41 @@ def GetAllInterfaces
end
end

# Calls wicked ifup if it is the currenct backend, set the link up
# otherwise
# Wrapper to call 'ip link set up' with the given interface
#
# @param [String] name of interface to 'set link up'
def SetLinkUp(dev_name)
log.info("Setting link up for interface #{dev_name}")
Run("ip link set #{dev_name} up")
end

# Wrapper to call 'ip link set down' with the given interface
#
# @param [String] name of interface to 'set link down'
def SetLinkDown(dev_name)
log.info("Setting link down for interface #{dev_name}")
Run("ip link set #{dev_name} down")
end

# Calls wicked ifup with the given interface
#
# @param [String] name of interface to put down
def SetIfaceUp(dev_name)
log.info("Setting interface #{dev_name} up")
Run("ifup #{dev_name} up")
Run("ifup #{dev_name}")
end

# Calls wicked ifdown if it is the current backend, set the link down
# otherwise
# Calls wicked ifdown with the given interface
#
# @param [String] name of interface to put down
def SetIfaceDown(dev_name)
log.info("Setting interface #{dev_name} down")
Run("ifdown #{dev_name}")
end

# Tries to set all interfaces up
#
# @return [boolean] false if some of interfaces cannot be set up
def SetAllIfacesUp
interfaces = GetAllInterfaces()

return false if interfaces.empty?

interfaces.all? { |i| SetIfaceUp(i) }
end

# Tries to set all interfaces down
#
# @return [boolean] false if some of interfaces cannot be set down
def SetAllIfacesDown
interfaces = GetAllInterfaces()

return false if interfaces.empty?

interfaces.all? { |i| SetIfaceDown(i) }
# Tries to set the link up of all available interfaces
def SetAllLinksUp
GetAllInterfaces().each { |i| SetLinkUp(i) }
end

# Checks if given device has carrier
Expand Down Expand Up @@ -800,8 +797,8 @@ def physical_port_id?(dev_name)
def phy_connected?(dev_name)
return true if has_carrier?(dev_name)

# SetIfaceUp ensures that driver is loaded
SetIfaceUp(dev_name)
# SetLinkUp ensures that driver is loaded
SetLinkUp(dev_name)

# Wait for driver initialization if needed. bnc#876848
# 5 secs is minimum proposed by sysconfig guys for intel drivers.
Expand Down

0 comments on commit 9888c9e

Please sign in to comment.