diff options
author | Claire McQuin <claire@getchef.com> | 2014-09-19 12:10:20 -0700 |
---|---|---|
committer | Claire McQuin <claire@getchef.com> | 2014-09-22 11:22:30 -0700 |
commit | 981ef241fa1f2f48cfa60b3bac5d921fcfe78fbb (patch) | |
tree | dcacec1cd7412ac676c65f28a43c95776045e405 | |
parent | cee42f2dc85c354bda9208aaa945819abe64babd (diff) | |
download | chef-981ef241fa1f2f48cfa60b3bac5d921fcfe78fbb.tar.gz |
Escape path for globbing.
-rw-r--r-- | lib/chef/provider/service/insserv.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/provider/service/insserv.rb b/lib/chef/provider/service/insserv.rb index f4c85dd9d3..1ee817707a 100644 --- a/lib/chef/provider/service/insserv.rb +++ b/lib/chef/provider/service/insserv.rb @@ -17,6 +17,7 @@ # require 'chef/provider/service/init' +require 'chef/util/path_helper' class Chef class Provider @@ -27,7 +28,7 @@ class Chef super # Look for a /etc/rc.*/SnnSERVICE link to signifiy that the service would be started in a runlevel - if Dir.glob("/etc/rc**/S*#{@current_resource.service_name}").empty? + if Dir.glob("/etc/rc**/S*#{Chef::Util::PathHelper.escape_glob(@current_resource.service_name)}").empty? @current_resource.enabled false else @current_resource.enabled true |