projects
/
aids.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a903cd
)
Some services have underscores in their name
author
Steven McDonald
<steven@steven-mcdonald.id.au>
Sun, 14 Oct 2012 02:56:55 +0000
(13:56 +1100)
committer
Steven McDonald
<steven@steven-mcdonald.id.au>
Sun, 14 Oct 2012 02:56:55 +0000
(13:56 +1100)
lib/aids.rb
patch
|
blob
|
history
diff --git
a/lib/aids.rb
b/lib/aids.rb
index 7f08f709a8bce87303eae367d48bd2c55f43c897..ab3e4a50b2e59dbbb6df7a0e786c72a457924a7a 100644
(file)
--- 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}")