compass-adapters/chef/cookbooks/selinux/libraries/selinux_service_helpers.rb
Weidong Shao 486c596323 Replace cookbooks for IceHouse release
Change-Id: Ibb6bdd3ed7795b86f773f9cb6ce1dfffb9b79faf
2014-08-07 08:36:02 +00:00

13 lines
268 B
Ruby

module SELinuxServiceHelpers
def self.selinux_bool(bool)
if ['on', 'true', '1'].include? bool
'on'
elsif ['off', 'false', '0'].include? bool
'off'
else
Chef::Log.warn "Not a valid boolean value: #{bool}"
nil
end
end
end