diff options
-rw-r--r-- | AUTHORS | 9 | ||||
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/schroot.default | 13 | ||||
-rwxr-xr-x | debian/schroot.init | 43 |
5 files changed, 69 insertions, 9 deletions
@@ -1,8 +1,11 @@ The list of contributors, in alphabetical order, is as follows. The principal areas that each contributed to are listed in addition. -Roger Leigh <rleigh@debian.org> - Architecture, Coding, Documentation. - Andreas Bombe <aeb@debian.org> Documentation improvements. + +Federico Di Gregorio <fog@debian.org> + Init script improvements. + +Roger Leigh <rleigh@debian.org> + Architecture, Coding, Documentation. @@ -1,3 +1,9 @@ +2007-04-02 Roger Leigh <rleigh@debian.org> + + * AUTHORS: Add Federico Di Gregorio. + + * debian/changelog: Update init script to use a default file. + 2007-04-01 Roger Leigh <rleigh@debian.org> * Move schroot, dchroot, dchroot and csbuild to a new diff --git a/debian/changelog b/debian/changelog index 0aa8562a..07d3bb56 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,8 +17,13 @@ schroot (1.1.1-1) UNRELEASED; urgency=low * debian/libsbuild1.install: New file, install libsbuild.so.*. * debian/libsbuild-dev.install: New file, installing headers, .so symlink and pkg-config .pc file. + * debian/schroot.default: New file, allowing customisation of the init + script. Thanks to Federico Di Gregorio (Closes: #416193). + * debian/schroot.init: + - Source /etc/default/schroot. + - Add copyright header. - -- Roger Leigh <rleigh@debian.org> Sun, 1 Apr 2007 21:33:31 +0100 + -- Roger Leigh <rleigh@debian.org> Mon, 2 Apr 2007 10:40:09 +0100 schroot (1.1.0-1) unstable; urgency=low diff --git a/debian/schroot.default b/debian/schroot.default new file mode 100644 index 00000000..adb10910 --- /dev/null +++ b/debian/schroot.default @@ -0,0 +1,13 @@ +# 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="recover" + diff --git a/debian/schroot.init b/debian/schroot.init index 13ebc5c2..93e5feb0 100755 --- a/debian/schroot.init +++ b/debian/schroot.init @@ -13,6 +13,24 @@ # Setup scripts will be run to mount filesystems and # bring the chroot back to a working state. ### END INIT INFO +# +# Copyright © 2006-2007 Roger Leigh <rleigh@debian.org> +# Copyright © 2007 Federico Di Gregorio <fog@debian.org> +# +# schroot is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# schroot is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, +# MA 02111-1307 USA SCHROOT=/usr/bin/schroot PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin @@ -22,10 +40,10 @@ NAME=schroot test -x $SCHROOT || exit 0 -# Include #PACKAGE# defaults if available -#if [ -f "/etc/default/$NAME" ] ; then -# . "/etc/default/$NAME" -#fi +# Include schroot defaults if available +if [ -f "/etc/default/$NAME" ] ; then + . "/etc/default/$NAME" +fi set -e @@ -40,9 +58,24 @@ recover_sessions() log_end_msg 0 } +end_sessions() +{ + log_daemon_msg "Ending schroot sessions" + for chroot in `$SCHROOT --all-sessions --list --quiet` + do + $SCHROOT --chroot=$chroot --end-session || true + log_progress_msg "$chroot" + done + log_end_msg 0 +} + case "$1" in start|restart|force-reload) - recover_sessions + if [ "$SESSIONS_RECOVER" = "end" ] ; then + end_sessions + else + recover_sessions + fi ;; stop) ;; |