[26892] in Source-Commits
Re: /svn/athena r25819 - trunk/debathena/scripts
daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Thu Feb 21 15:56:37 2013
Date: Thu, 21 Feb 2013 12:56:30 -0800 (PST)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201302212002.r1LK2MmC029280@drugstore.mit.edu>
Message-ID: <alpine.DEB.2.00.1302211254290.7331@dr-wily.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
NAK -- this is what schroot --all-sessions --end-session is for, right?
(and schroot --all-sessions --list should work for displaying them)
--
Geoffrey Thomas
geofft@mit.edu
On Thu, 21 Feb 2013, Jonathan D Reed wrote:
> Author: jdreed
> Date: 2013-02-21 15:02:22 -0500 (Thu, 21 Feb 2013)
> New Revision: 25819
>
> Added:
> trunk/debathena/scripts/end-all-schroot-sessions
> Log:
> Add convenience script for cleaning up stray schroot sessions
>
> Added: trunk/debathena/scripts/end-all-schroot-sessions
> ===================================================================
> --- trunk/debathena/scripts/end-all-schroot-sessions (rev 0)
> +++ trunk/debathena/scripts/end-all-schroot-sessions 2013-02-21 20:02:22 UTC (rev 25819)
> @@ -0,0 +1,22 @@
> +#!/bin/sh
> +
> +# End stale schroot sessions
> +
> +CHROOTS=$(schroot -la | awk -F: '$1=="session" { print $2; }')
> +if [ -z "$CHROOTS" ]; then
> + echo "No chroot sessions, nothing to do."
> + exit 0
> +fi
> +echo "Found these chroot sessions:"
> +echo $CHROOTS
> +echo -n "End them? (y/n) "
> +read ans
> +[ "$ans" = "y" ] || exit 0
> +set -e
> +for c in $CHROOTS; do
> + echo "Ending $c"
> + schroot -c "$c" -e
> +done
> +set +e
> +exit 0
> +
>
>
> Property changes on: trunk/debathena/scripts/end-all-schroot-sessions
> ___________________________________________________________________
> Added: svn:executable
> + *
>
>