[26891] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r25819 - trunk/debathena/scripts

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Thu Feb 21 15:02:29 2013

Date: Thu, 21 Feb 2013 15:02:22 -0500
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201302212002.r1LK2MmC029280@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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
   + *


home help back first fref pref prev next nref lref last post