Bug #1547
Fix dot escaping regression
| Status: | Closed | Start date: | 09/02/2008 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% |
||
| Category: | library | |||
| Target version: | 1.5.3 | |||
| Keywords: | Affected Facter version: | |||
| Branch: | ||||
| Votes: | 0 |
Description
Fix the latest introduced dot escaping regression bug.
commit:“badf95f” “pushed to fix_dots”:http://github.com/duritong/facter/tree/fix_dots
Related issues
History
Updated by James Turnbull over 3 years ago
- Status changed from Unreviewed to Closed
Already fixed in commit:518393ee0a6943237d66c4143d70370475598b17 but thank you.
Updated by Bart Cortooms over 3 years ago
Even though I’m running a Facter version which has commit 518393ee0a6943237d66c4143d70370475598b17 I’m still seeing dots in facts:
$ sudo facter | grep '^mac.*\.' macaddress_vif1.0 => FE:FF:FF:FF:FF:FF
This fixes it:
$ git-diff lib/facter
diff --git a/lib/facter/ipmess.rb b/lib/facter/ipmess.rb
index badf95f..e879300 100644
--- a/lib/facter/ipmess.rb
+++ b/lib/facter/ipmess.rb
@@ -17,7 +17,7 @@ end
case Facter.value(:kernel)
when 'SunOS', 'Linux', 'OpenBSD', 'NetBSD', 'FreeBSD'
Facter::IPAddress.get_interfaces.each do |interface|
- mi = interface.gsub('/:|\./', '_')
+ mi = interface.gsub(/[:.]/, '_')
Facter.add("ipaddress_" + mi) do
confine :kernel => [ :sunos, :freebsd, :openbsd, :netbsd, :linux ]
Updated by Bart Cortooms over 3 years ago
- Status changed from Closed to Re-opened
I forgot to re-open the ticket
Updated by James Turnbull over 3 years ago
- Status changed from Re-opened to Ready For Checkin
- Assignee changed from James Turnbull to Luke Kanies
- Target version set to 1.5.3
Thought my fix worked fine – it seemed to match but happy to accept yours if it works better.
Pushed in commit:1d0025310905033352fd39b654cb3e9091337bca in branch master.
Updated by James Turnbull over 3 years ago
- Status changed from Ready For Checkin to Closed
- % Done changed from 0 to 100
Applied in changeset commit:1d0025310905033352fd39b654cb3e9091337bca.