summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/chef/provider/service/freebsd.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/provider/service/freebsd.rb b/lib/chef/provider/service/freebsd.rb
index 01f7adef9f..5f6ee0ff74 100644
--- a/lib/chef/provider/service/freebsd.rb
+++ b/lib/chef/provider/service/freebsd.rb
@@ -161,9 +161,9 @@ class Chef
case line
when /^#{Regexp.escape(var_name)}="(\w+)"/
enabled_state_found!
- if $1 =~ /^yes$/i
+ if $1.casecmp?("yes")
current_resource.enabled true
- elsif $1 =~ /^(no|none)$/i
+ elsif $1.casecmp?("no") || $1.casecmp?("none")
current_resource.enabled false
end
end