Add a "native" target to run the kernel NFS server.
[bluesky.git] / microbench / setup / cleanup-proxy
index 80fd963..e88e7fe 100755 (executable)
@@ -4,5 +4,22 @@
 
 . /scratch/aws-keys
 
-rm -rf /export/journal
-/scratch/bluesky.git/microbench/setup/s3-cleanup.py
+export BLUESKY_TARGET=s3
+# Export any environment variables specified on the command line
+for e in "$@"; do
+    echo "$e" 1>&2
+    if echo "$e" | grep = >/dev/null; then
+        eval "$e"
+        export ${e%=*}
+    fi
+done
+
+if [ "$BLUESKY_TARGET" = "native" ]; then
+    /etc/init.d/nfs-kernel-server stop
+    umount /export
+    mkfs.ext3 /dev/sda10
+    mount /export
+else
+    rm -rf /export/journal
+    /scratch/bluesky.git/microbench/setup/s3-cleanup.py
+fi