facter 4.9.0 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6aeed6f3058d490dd1b3e734c8d8de31efd16a275324e019e619a6084d465722
|
|
4
|
+
data.tar.gz: 224c4d60e9a71cbce735ee6de290949c73d949580e6e68ae16977b12fbc25517
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c47aaeaf6fafa8cefe84f8e32fd5837d0a138ca6561b96fa7016f633e7fbc9920c0e0986334dd012d5adc34a2fecd281529a997f51a6af5db25bcc7a12553e9
|
|
7
|
+
data.tar.gz: c8af80e38871c4e5261ad91ad858c66a665a2d48094a8c1fe941cfcb4df28b20490abdba6d221fd1b10caa7e3614f04101e87f5fe983c1c8ff40846b5c025ba5
|
|
@@ -25,8 +25,8 @@ module Facter
|
|
|
25
25
|
# set the new (temporary) value for the environment variable
|
|
26
26
|
ENV[var] = value
|
|
27
27
|
end
|
|
28
|
-
# execute the caller's block,
|
|
29
|
-
|
|
28
|
+
# execute the caller's block, returning its value
|
|
29
|
+
yield
|
|
30
30
|
# use an ensure block to make absolutely sure we restore the variables
|
|
31
31
|
ensure
|
|
32
32
|
# restore the old values
|
|
@@ -38,8 +38,6 @@ module Facter
|
|
|
38
38
|
ENV.delete(var)
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
|
-
# return the captured return value
|
|
42
|
-
rv
|
|
43
41
|
end
|
|
44
42
|
|
|
45
43
|
def execute(command, options = {})
|
|
@@ -68,9 +68,9 @@ module Facter
|
|
|
68
68
|
|
|
69
69
|
def read_domain
|
|
70
70
|
file_content = Facter::Util::FileHelper.safe_read('/etc/resolv.conf')
|
|
71
|
-
if file_content =~ /^domain\s+(\S+)/
|
|
71
|
+
if file_content =~ /^domain\s+([^.]\S+)/
|
|
72
72
|
Regexp.last_match(1)
|
|
73
|
-
elsif file_content =~ /^search\s+(\S+)/
|
|
73
|
+
elsif file_content =~ /^search\s+([^.]\S+)/
|
|
74
74
|
Regexp.last_match(1)
|
|
75
75
|
end
|
|
76
76
|
end
|
|
@@ -96,9 +96,9 @@ module Facter
|
|
|
96
96
|
|
|
97
97
|
def read_domain
|
|
98
98
|
file_content = Facter::Util::FileHelper.safe_read('/etc/resolv.conf')
|
|
99
|
-
if file_content =~ /^domain\s+(\S+)/
|
|
99
|
+
if file_content =~ /^domain\s+([^.]\S+)/
|
|
100
100
|
Regexp.last_match(1)
|
|
101
|
-
elsif file_content =~ /^search\s+(\S+)/
|
|
101
|
+
elsif file_content =~ /^search\s+([^.]\S+)/
|
|
102
102
|
Regexp.last_match(1)
|
|
103
103
|
end
|
|
104
104
|
end
|
data/lib/facter/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: facter
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Puppet
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-
|
|
11
|
+
date: 2024-10-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: ffi
|
|
@@ -1193,7 +1193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1193
1193
|
- !ruby/object:Gem::Version
|
|
1194
1194
|
version: '0'
|
|
1195
1195
|
requirements: []
|
|
1196
|
-
rubygems_version: 3.
|
|
1196
|
+
rubygems_version: 3.5.19
|
|
1197
1197
|
signing_key:
|
|
1198
1198
|
specification_version: 4
|
|
1199
1199
|
summary: Facter, a system inventory tool
|