From: Peter Palfrader Date: Fri, 5 Dec 2014 18:15:03 +0000 (+0100) Subject: only include /srv/build-trees in fstab if it exists X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=ea3a5fb80c7d8a582f150921b9f7247e01c5e27d;p=mirror%2Fdsa-puppet.git only include /srv/build-trees in fstab if it exists --- diff --git a/modules/debian-org/lib/facter/paths.rb b/modules/debian-org/lib/facter/paths.rb index 507d1df36..6e991f0ab 100644 --- a/modules/debian-org/lib/facter/paths.rb +++ b/modules/debian-org/lib/facter/paths.rb @@ -1,4 +1,4 @@ -Facter.add("has-srv-build-trees") do +Facter.add("has_srv_build_trees") do setcode do if FileTest.exist?("/srv/build-trees") true @@ -7,7 +7,7 @@ Facter.add("has-srv-build-trees") do end end end -Facter.add("has-srv-buildd") do +Facter.add("has_srv_buildd") do setcode do if FileTest.exist?("/srv/buildd") true diff --git a/modules/schroot/templates/schroot-buildd/fstab.erb b/modules/schroot/templates/schroot-buildd/fstab.erb index 5b000d1a2..815e64cfd 100644 --- a/modules/schroot/templates/schroot-buildd/fstab.erb +++ b/modules/schroot/templates/schroot-buildd/fstab.erb @@ -18,5 +18,8 @@ dev /dev/fd fdescfs rw,bind 0 0 /dev/pts /dev/pts none rw,bind 0 0 tmpfs-shm /dev/shm tmpfs defaults,size=64m 0 0 +<%- if has_variable?("has_srv_build_trees") && has-srv-build-trees == "true" -%> /srv/build-trees /build none rw,bind 0 0 + +<% end %> <% end %>