On 8 February 2012 02:37, d...@looprock.com<technopathol...@gmail.com>  wrote:
I use this:

Facter.add("operatingsystemrelease_mv") do
        setcode do
                %x{cat /etc/redhat-release |awk \{'print $3'\}|cut -
c1}.chomp
        end
end


I think that will fail on centos. This line is better, works on centos/rhel. cat /etc/redhat-release |awk -Frelease {'print $2'} | awk {'print $1'} | awk -F. {'print $1'}

--
You received this message because you are subscribed to the Google Groups "Puppet 
Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to