]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
make mount-defaults conditional and kfreebsd-compatible
authorPhilipp Kern <pkern@debian.org>
Sat, 5 Feb 2011 13:24:37 +0000 (14:24 +0100)
committerStephen Gran <steve@lobefin.net>
Sat, 5 Feb 2011 13:49:37 +0000 (13:49 +0000)
Signed-off-by: Philipp Kern <pkern@debian.org>
modules/buildd/files/mount-defaults [deleted file]
modules/buildd/manifests/init.pp
modules/buildd/templates/etc/schroot/mount-defaults.erb [new file with mode: 0644]

diff --git a/modules/buildd/files/mount-defaults b/modules/buildd/files/mount-defaults
deleted file mode 100644 (file)
index f3971e2..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-##
-## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
-## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
-##
-# mount.defaults: static file system information for chroots.
-# Note that the mount point will be prefixed by the chroot path
-# (CHROOT_PATH)
-#
-# <file system> <mount point>   <type>  <options>       <dump>  <pass>
-proc            /proc           proc    defaults        0       0
-/dev/pts        /dev/pts        none    rw,bind         0       0
-tmpfs           /dev/shm        tmpfs   defaults        0       0
index 509d3356724c1c790108387f829c08047251dd67..0593e2bff4337d283064ea17660f1d8cdf3d4311 100644 (file)
@@ -21,7 +21,7 @@ class buildd {
              notify  => Exec["apt-keys-update"],
              ;
         "/etc/schroot/mount-defaults":
-             source  => "puppet:///modules/buildd/mount-defaults",
+             content => template("buildd/etc/schroot/mount-defaults.erb"),
              require => Package["sbuild"]
              ;
         "/etc/cron.d/dsa-buildd":
diff --git a/modules/buildd/templates/etc/schroot/mount-defaults.erb b/modules/buildd/templates/etc/schroot/mount-defaults.erb
new file mode 100644 (file)
index 0000000..c77a763
--- /dev/null
@@ -0,0 +1,22 @@
+##
+## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
+## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git
+##
+# mount.defaults: static file system information for chroots.
+# Note that the mount point will be prefixed by the chroot path
+# (CHROOT_PATH)
+#
+# <file system> <mount point>   <type>  <options>       <dump>  <pass>
+<% if nodeinfo['ldap'].has_key?('architecture') and nodeinfo['ldap']['architecture'].start_with?('kfreebsd') -%>
+# kFreeBSD version
+proc           /proc           linprocfs       defaults        0       0
+dev            /dev            devfs   rw,bind         0       0
+dev            /dev/fd         fdescfs rw,bind         0       0
+sys            /sys            linsysfs        defaults        0       0
+<% else -%>
+# Linux version
+proc            /proc           proc    defaults        0       0
+/dev/pts        /dev/pts        none    rw,bind         0       0
+tmpfs           /dev/shm        tmpfs   defaults        0       0
+<% end %>
+