svn commit: r258277 - in user/nwhitehorn/condorports/altjailscripts: . unionfs
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun Nov 17 21:31:12 UTC 2013
Author: nwhitehorn
Date: Sun Nov 17 21:31:11 2013
New Revision: 258277
URL: http://svnweb.freebsd.org/changeset/base/258277
Log:
Alternative approaches to making build jails. This one goes in the attic
because the in-kernel unionfs is a crashfest.
Added:
user/nwhitehorn/condorports/altjailscripts/
user/nwhitehorn/condorports/altjailscripts/unionfs/
user/nwhitehorn/condorports/altjailscripts/unionfs/prepbuildjail
- copied, changed from r258276, user/nwhitehorn/condorports/prepbuildjail
user/nwhitehorn/condorports/altjailscripts/unionfs/reapbuildjail
- copied unchanged from r258276, user/nwhitehorn/condorports/reapbuildjail
Copied and modified: user/nwhitehorn/condorports/altjailscripts/unionfs/prepbuildjail (from r258276, user/nwhitehorn/condorports/prepbuildjail)
==============================================================================
--- user/nwhitehorn/condorports/prepbuildjail Sun Nov 17 20:58:31 2013 (r258276, copy source)
+++ user/nwhitehorn/condorports/altjailscripts/unionfs/prepbuildjail Sun Nov 17 21:31:11 2013 (r258277)
@@ -8,7 +8,7 @@ case $slot in
*[^a-zA-Z0-9]* ) echo "Non-alphanumeric slot $slot"; exit 1
esac
case $release in
- *[^a-zA-Z0-9]* ) echo "Non-alphanumeric release $release"; exit 1
+ *[^a-zA-Z0-9/-]* ) echo "Non-alphanumeric release $release"; exit 1
esac
case $ports in
*[^a-zA-Z0-9/-]* ) echo "Non-alphanumeric ports $ports"; exit 1
Copied: user/nwhitehorn/condorports/altjailscripts/unionfs/reapbuildjail (from r258276, user/nwhitehorn/condorports/reapbuildjail)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ user/nwhitehorn/condorports/altjailscripts/unionfs/reapbuildjail Sun Nov 17 21:31:11 2013 (r258277, copy of r258276, user/nwhitehorn/condorports/reapbuildjail)
@@ -0,0 +1,26 @@
+#!/bin/sh
+slot=$1
+
+#Audit slot and release names
+case $slot in
+ *[^a-zA-Z0-9]* ) echo "Non-alphanumeric slot $slot"; exit 1
+esac
+if [ -z "$slot" ]; then
+ echo "Zero-length slot or release"
+ exit 1
+fi
+
+if [ ! -d /scratch/$slot ]; then
+ echo "No file system for slot!"
+ exit 1
+fi
+
+set +e
+set -o noclobber
+echo > /scratch/$slot.lock
+jail -f /scratch/$slot.conf -r $slot
+chflags -R noschg /scratch/$slot
+rm -rf /scratch/$slot /scratch/$slot.conf /scratch/$slot.fstab
+set +e
+rm /scratch/$slot.lock
+
More information about the svn-src-user
mailing list