From: Steven McDonald Date: Sun, 14 Oct 2012 02:56:55 +0000 (+1100) Subject: Some services have underscores in their name X-Git-Tag: v0.1.2~2 X-Git-Url: http://git.steven-mcdonald.id.au/?a=commitdiff_plain;h=e0f5c5f1767ed0e441e25204ad237f338f05f001;p=aids.git Some services have underscores in their name --- diff --git a/lib/aids.rb b/lib/aids.rb index 7f08f70..ab3e4a5 100644 --- a/lib/aids.rb +++ b/lib/aids.rb @@ -25,7 +25,7 @@ module AIDS raise AIDS::Infection.new("Service name must be a non-empty string, got #{name.inspect}.") end name = $1 if name =~ %r{^/etc/init\.d/(.+)$} - if name =~ /[^[:alnum:]\-.]/ + if name =~ /[^[:alnum:]\-._]/ raise AIDS::Infection.new("Invalid init script name: #{name}.") end unless File.exist?("/etc/init.d/#{name}")