summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorMichael Brown2010-09-22 17:40:06 +0200
committerMichael Brown2010-09-22 17:40:06 +0200
commitd052efb2546d05572f553946a16ccca42313b25a (patch)
tree6f6b5a8c6ecd93955c314df445e5c29467848cf2 /contrib
parent[contrib] Add script to easily create copy-on-write SAN images (diff)
downloadipxe-d052efb2546d05572f553946a16ccca42313b25a.tar.gz
ipxe-d052efb2546d05572f553946a16ccca42313b25a.tar.xz
ipxe-d052efb2546d05572f553946a16ccca42313b25a.zip
[contrib] Allow "cow" script to create the SAN device itself
Allow for an invocation pattern such as: ./cow /path/to/image/file vblade 1 2 eth0 Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/vm/cow9
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/vm/cow b/contrib/vm/cow
index 4abb8b82..054ffdde 100755
--- a/contrib/vm/cow
+++ b/contrib/vm/cow
@@ -19,9 +19,10 @@ function cleanup () {
trap cleanup EXIT
-imgfile=$1
-if [ -z "$imgfile" ] ; then
- echo Syntax: $0 /path/to/image/file
+imgfile=$1 ; shift
+command=$1 ; shift
+if [ -z "$imgfile" -o -z "$command" ] ; then
+ echo Syntax: $0 /path/to/image/file command [args..]
exit 1
fi
@@ -45,4 +46,4 @@ x=$imgfile.cow ; ln -s /dev/mapper/$dmname $x ; cowlink=$x
# Wait until killed
echo "Created $cowlink"
-while : ; do sleep 2147483647 ; done
+$command "$@" $cowlink