Add RHEL detection from the .el[2-6] match

git-svn-id: file:///home/svn/framework3/trunk@12973 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2011-06-18 18:12:59 +00:00
parent 6ccbaedd57
commit 47523c5925
1 changed files with 274 additions and 269 deletions

View File

@ -91,6 +91,10 @@ class Host < ActiveRecord::Base
when 'smb'
points = 210
case s.info
when /\.el([23456])(\s+|$)/ # Match Samba 3.0.33-0.30.el4 as RHEL4
wname['Linux'] = wname['Linux'].to_i + points
wflav["RHEL" + $1] = wflav["RHEL" + $1].to_i + points
wtype['server'] = wtype['server'].to_i + points
when /(ubuntu|debian|fedora|red ?hat|rhel)/i
wname['Linux'] = wname['Linux'].to_i + points
wflav[$1.capitalize] = wflav[$1.capitalize].to_i + points
@ -966,3 +970,4 @@ end
end
end