only include /srv/build-trees in fstab if it exists
authorPeter Palfrader <peter@palfrader.org>
Fri, 5 Dec 2014 18:15:03 +0000 (19:15 +0100)
committerPeter Palfrader <peter@palfrader.org>
Fri, 5 Dec 2014 18:15:03 +0000 (19:15 +0100)
modules/debian-org/lib/facter/paths.rb
modules/schroot/templates/schroot-buildd/fstab.erb

index 507d1df..6e991f0 100644 (file)
@@ -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
index 5b000d1..815e64c 100644 (file)
@@ -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 %>