Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

rewrite the apt sources template files to include a sysvinit and anot…

…her upstart version; this will no longer require any other changes for future versions of ubuntu (unless there is of course a new apt source for that)
  • Loading branch information...
commit c02c519052a03dc0781bc2c74ecf72447a674b4f 1 parent 09ded3f
@mdxp authored
View
12 mongodb-debs/recipes/repo.rb
@@ -20,6 +20,17 @@
return unless ["ubuntu", "debian"].include?(node[:platform])
+case node["platform"]
+when "ubuntu"
+ if (8.04..9.04).include?(node["platform_version"].to_f)
+ apt_repo = "mongodb.list.sysvinit.erb"
+ else
+ apt_repo = "mongodb.list.upstart.erb"
+ end
+when "debian"
+ apt_repo = "mongodb.list.sysvinit.erb"
+end
+
execute "request mongodb key" do
command "gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 7F0CEB10"
not_if "gpg --list-keys 7F0CEB10"
@@ -31,6 +42,7 @@
end
template "/etc/apt/sources.list.d/mongodb.list" do
+ source apt_repo
mode 0644
end
View
0  ...db-debs/templates/debian/mongodb.list.erb → ...mplates/default/mongodb.list.sysvinit.erb
File renamed without changes
View
0  ...s/templates/ubuntu-12.04/mongodb.list.erb → ...emplates/default/mongodb.list.upstart.erb 100755 → 100644
File renamed without changes
View
1  mongodb-debs/templates/ubuntu-10.04/mongodb.list.erb
@@ -1 +0,0 @@
-deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
View
1  mongodb-debs/templates/ubuntu-10.10/mongodb.list.erb
@@ -1 +0,0 @@
-deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
View
1  mongodb-debs/templates/ubuntu-11.04/mongodb.list.erb
@@ -1 +0,0 @@
-deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
View
1  mongodb-debs/templates/ubuntu-11.10/mongodb.list.erb
@@ -1 +0,0 @@
-deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen
View
1  mongodb-debs/templates/ubuntu-9.04/mongodb.list.erb
@@ -1 +0,0 @@
-deb http://downloads.mongodb.org/distros/ubuntu 9.4 10gen
View
1  mongodb-debs/templates/ubuntu-9.10/mongodb.list.erb
@@ -1 +0,0 @@
-deb http://downloads.mongodb.org/distros/ubuntu 9.10 10gen
Please sign in to comment.
Something went wrong with that request. Please try again.