[23064] in Source-Commits
/svn/athena r22727 - in trunk/debathena/scripts: . build-server
daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Thu Jan 31 13:38:15 2008
Date: Thu, 31 Jan 2008 13:37:45 -0500 (EST)
From: ghudson@MIT.EDU
Message-Id: <200801311837.NAA26870@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: ghudson
Date: 2008-01-31 13:37:45 -0500 (Thu, 31 Jan 2008)
New Revision: 22727
Modified:
trunk/debathena/scripts/build-server/make-chroot
trunk/debathena/scripts/clean-schroots
Log:
Support volume groups other than "dink" on build servers.
* debathena/scripts/clean-schroots,
debathena/scripts/build-server/make-chroot: Allow VG environment
variable setting to override the hardcoded /dev/dink.
Modified: trunk/debathena/scripts/build-server/make-chroot
===================================================================
--- trunk/debathena/scripts/build-server/make-chroot 2008-01-31 02:34:14 UTC (rev 22726)
+++ trunk/debathena/scripts/build-server/make-chroot 2008-01-31 18:37:45 UTC (rev 22727)
@@ -8,7 +8,7 @@
set -xe
-VG=/dev/dink
+: ${VG=/dev/dink}
SUITE=$1
ARCH=$2
CHROOT="${SUITE}-${ARCH}-sbuild"
Modified: trunk/debathena/scripts/clean-schroots
===================================================================
--- trunk/debathena/scripts/clean-schroots 2008-01-31 02:34:14 UTC (rev 22726)
+++ trunk/debathena/scripts/clean-schroots 2008-01-31 18:37:45 UTC (rev 22727)
@@ -5,12 +5,10 @@
# Remove any LVM snapshots and chroots left behind by schroot. Not
# normally necessary as schroot should clean up after itself.
-if [ -z "$vg" ]; then
- vg=/dev/dink
-fi
+: ${VG=/dev/dink}
set -x
for i in $(
- for dir in "$vg" /var/lib/schroot/mount /var/lib/schroot/session; do
+ for dir in "$VG" /var/lib/schroot/mount /var/lib/schroot/session; do
cd "$dir"
for i in *-*-sbuild-*-*-*-*-*; do
echo "$i"
@@ -21,8 +19,8 @@
schroot -ec "$(echo "$i" | sed 's/-cow$//')"
if [ "$1" = "-f" ]; then
tac /proc/mounts | cut -d" " -f2 | fgrep "/var/lib/schroot/mount/$i" | xargs -rn1 umount -l
- lvremove -f "$vg/$i"
+ lvremove -f "$VG/$i"
rmdir /var/lib/schroot/mount/"$i" /var/lib/schroot/session/"$i"
- if ! [ -e "$vg/$i" ]; then rm "$vg/$i"; fi
+ if ! [ -e "$VG/$i" ]; then rm "$VG/$i"; fi
fi
done