Skip to content

Commit

Permalink
Documentation and minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Jul 13, 2017
1 parent f8b07c7 commit 57fafb2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package/yast2-network.changes
Expand Up @@ -2,7 +2,7 @@
Wed Jul 12 05:37:30 UTC 2017 - mfilka@suse.com

- bnc#1038717
- avoid creating duplicit udev rules in AutoYaST installation
- avoid creating duplicate udev rules in AutoYaST installation
- 3.1.178

-------------------------------------------------------------------
Expand Down
9 changes: 8 additions & 1 deletion src/lib/network/network_autoyast.rb
Expand Up @@ -227,8 +227,15 @@ def valid_rename_udev_rule?(rule)
true
end

# Renames a network device represented by given item.
#
# @param [Integer] item is an item id. See LanItems for detail
# @param [String] name_to new device name
# @param [String] attr an udev attribute usable in NIC's rule. Currently just
# "KERNELS" or "ATTR{address}" makes sense. This parameter is optional
# @param [String] value for the given udev attribute. Optional parameter.
def rename_lan_item(item, name_to, attr = nil, key = nil)
return if item.nil? || item.empty? || item < 0 || item >= LanItems.Items.size
return if item.nil? || item < 0 || item >= LanItems.Items.size
return if name_to.nil? || name_to.empty?

# selecting according device name is unreliable (selects only in between configured devices)
Expand Down

0 comments on commit 57fafb2

Please sign in to comment.