diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-24 20:00:30 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-02-24 20:00:30 +0000 |
commit | 7e5cc76cf9afb4b18a412e6971ea5a4f4a44935e (patch) | |
tree | cf3f77daac592b55cb67176a1d0b281fceced198 /lib/puppet | |
parent | 7806618227c4a3df1fef446e2d1307afeec53db4 (diff) | |
download | puppet-7e5cc76cf9afb4b18a412e6971ea5a4f4a44935e.tar.gz puppet-7e5cc76cf9afb4b18a412e6971ea5a4f4a44935e.tar.xz puppet-7e5cc76cf9afb4b18a412e6971ea5a4f4a44935e.zip |
Fixing package types so you can specify the package type manually in a manifest
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@937 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/type/package.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/puppet/type/package.rb b/lib/puppet/type/package.rb index 82afb86a5..ab16cd86d 100644 --- a/lib/puppet/type/package.rb +++ b/lib/puppet/type/package.rb @@ -258,6 +258,9 @@ module Puppet # We cannot log in this routine, because this gets called before # there's a name for the package. munge do |type| + if type.is_a? String + type = type.intern + end @parent.type2module(type) end end @@ -385,6 +388,7 @@ module Puppet Puppet.notice "No support for gentoo yet" @default = nil when "debian": @default = :apt + when "centos": @default = :rpm when "fedora": @default = :yum when "redhat": @default = :rpm when "openbsd": @default = :bsd @@ -392,7 +396,7 @@ module Puppet if Facter["kernel"] == "Linux" Puppet.warning "Defaulting to RPM for %s" % Facter["operatingsystem"].value - @default = nil + @default = :rpm else Puppet.warning "No default package system for %s" % Facter["operatingsystem"].value |