FreeBSD Bugzilla – Attachment 143533 Details for
Bug 190796
Patch for sysutils/rubygem-facter to add interface alias support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Diff against the port.
rubgem-facter-netaliases.diff (text/plain), 2.09 KB, created by
Michelle Sullivan
on 2014-06-08 16:22:22 UTC
(
hide
)
Description:
Diff against the port.
Filename:
MIME Type:
Creator:
Michelle Sullivan
Created:
2014-06-08 16:22:22 UTC
Size:
2.09 KB
patch
obsolete
>diff -Nur rubygem-facter.orig/files/patch-lib__facter__interfaces.rb rubygem-facter/files/patch-lib__facter__interfaces.rb >--- rubygem-facter.orig/files/patch-lib__facter__interfaces.rb 2014-06-08 11:16:44.000000000 -0500 >+++ rubygem-facter/files/patch-lib__facter__interfaces.rb 1969-12-31 18:00:00.000000000 -0600 >@@ -1,20 +0,0 @@ >---- ./lib/facter/interfaces.rb.orig 2014-06-08 11:05:48.000000000 -0500 >-+++ ./lib/facter/interfaces.rb 2014-06-08 11:06:21.000000000 -0500 >-@@ -39,3 +39,17 @@ >- end >- end >- end >-+ >-+# Get the firs 10 aliases on *BSD - however there could be more, just don't support them >-+# as it pushes up execution time >-+Facter::Util::IP.get_interfaces.each do |interface| >-+ %w{ipaddress ipaddress6 netmask}.each do |label| >-+ (0..9).each do |a| >-+ Facter.add(label + "_" + Facter::Util::IP.alphafy(interface) + "_alias#{a}") do >-+ setcode do >-+ Facter::Util::IP.get_interface_value(interface, label, a) >-+ end >-+ end >-+ end >-+ end >-+end >diff -Nur rubygem-facter.orig/files/patch-lib__facter__util__ip.rb rubygem-facter/files/patch-lib__facter__util__ip.rb >--- rubygem-facter.orig/files/patch-lib__facter__util__ip.rb 2014-06-08 11:16:44.000000000 -0500 >+++ rubygem-facter/files/patch-lib__facter__util__ip.rb 1969-12-31 18:00:00.000000000 -0600 >@@ -1,23 +0,0 @@ >---- ./lib/facter/util/ip.rb.orig 2014-06-08 11:06:52.000000000 -0500 >-+++ ./lib/facter/util/ip.rb 2014-06-08 11:08:34.000000000 -0500 >-@@ -210,7 +210,7 @@ >- # >- # @return [String] representing the requested value. An empty array is >- # returned if the kernel is not supported by the REGEX_MAP constant. >-- def self.get_interface_value(interface, label) >-+ def self.get_interface_value(interface, label, intalias = -1) >- if Facter.value(:kernel) == 'windows' >- require 'facter/util/ip/windows' >- return Facter::Util::IP::Windows.value_for_interface_and_label(interface, label) >-@@ -252,7 +252,10 @@ >- end >- >- if tmp1 >-- value = tmp1.shift >-+ (-1..intalias).each do |i| >-+ value = tmp1.shift >-+ end >-+ value >- end >- end >- end
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 190796
: 143533 |
144728