From: Andreas Barth <aba@not.so.argh.org>
Date: Thu, 28 Jul 2011 16:11:16 +0000 (+0000)
Subject: buildd: throw out chroots on reboot
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=70e15fda74aa32552eb1ddf7391596d918095639;p=dsa-puppet.git

buildd: throw out chroots on reboot
---

diff --git a/modules/buildd/files/default-schroot b/modules/buildd/files/default-schroot
new file mode 100644
index 00000000..b4131da5
--- /dev/null
+++ b/modules/buildd/files/default-schroot
@@ -0,0 +1,16 @@
+##
+## 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
+##
+# This is a configuration file for /etc/init.d/schroot; it allows you
+# to perform common modifications to the behavior of schroot
+# initialization without editing the init script (and thus getting
+# prompted by dpkg on upgrades).  Note that the defaults defined here
+# are not used when invoking the schroot command; to configure schroot
+# behaviour have a look at /etc/schroot/* and the schroot manual page
+# ("man schroot").
+
+# What do we want to do with "orphan" sessions when starting or
+# restarting?  Recover them (leave empty or set to "recover") or just
+# end them (set to "end")?
+SESSIONS_RECOVER="end"
diff --git a/modules/buildd/manifests/init.pp b/modules/buildd/manifests/init.pp
index da89852a..04992532 100644
--- a/modules/buildd/manifests/init.pp
+++ b/modules/buildd/manifests/init.pp
@@ -32,6 +32,10 @@ class buildd {
              source => "puppet:///modules/buildd/dupload.conf",
              require => Package["dupload"]
              ;
+        "/etc/default/schroot":
+             source => "puppet:///modules/buildd/default-schroot",
+             require => Package["schroot"]
+             ;
     }
 
     case $kernel {