From: Philipp Kern Date: Sat, 5 Feb 2011 13:24:37 +0000 (+0100) Subject: make mount-defaults conditional and kfreebsd-compatible X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=78418aaeb7f9f0b74efe1f46fe14d51c97ab9b15;p=dsa-puppet.git make mount-defaults conditional and kfreebsd-compatible Signed-off-by: Philipp Kern --- diff --git a/modules/buildd/files/mount-defaults b/modules/buildd/files/mount-defaults deleted file mode 100644 index f3971e2a..00000000 --- a/modules/buildd/files/mount-defaults +++ /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) -# -# -proc /proc proc defaults 0 0 -/dev/pts /dev/pts none rw,bind 0 0 -tmpfs /dev/shm tmpfs defaults 0 0 diff --git a/modules/buildd/manifests/init.pp b/modules/buildd/manifests/init.pp index 509d3356..0593e2bf 100644 --- a/modules/buildd/manifests/init.pp +++ b/modules/buildd/manifests/init.pp @@ -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 index 00000000..c77a7635 --- /dev/null +++ b/modules/buildd/templates/etc/schroot/mount-defaults.erb @@ -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) +# +# +<% 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 %> +