Lines 1-23
Link Here
|
1 |
diff --git a/lib/puppet/provider/service/freebsd.rb b/lib/puppet/provider/service/freebsd.rb |
|
|
2 |
index c75c3c9..f8c7134 100644 |
3 |
--- lib/puppet/provider/service/freebsd.rb |
4 |
+++ lib/puppet/provider/service/freebsd.rb |
5 |
@@ -18,6 +18,9 @@ Puppet::Type.type(:service).provide :freebsd, :parent => :init do |
6 |
def rcvar |
7 |
rcvar = execute([self.initscript, :rcvar], :failonfail => true, :squelch => false) |
8 |
rcvar = rcvar.split("\n") |
9 |
+ rcvar.delete_if {|str| str =~ /^#\s*$/} |
10 |
+ rcvar[1] = rcvar[1].gsub(/^\$/, '') |
11 |
+ rcvar |
12 |
end |
13 |
|
14 |
# Extract service name |
15 |
@@ -44,7 +47,7 @@ Puppet::Type.type(:service).provide :freebsd, :parent => :init do |
16 |
def rcvar_value |
17 |
value = self.rcvar[1] |
18 |
self.error("No rcvar value found in rcvar") if value.nil? |
19 |
- value = value.gsub!(/(.*)_enable=\"?(.*)\"?/, '\2') |
20 |
+ value = value.gsub!(/(.*)_enable="?(\w+)"?/, '\2') |
21 |
self.error("rcvar value is empty") if value.nil? |
22 |
self.debug("rcvar value is #{value}") |
23 |
value |