Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
mcb30 committed Sep 22, 2010
1 parent 45d066d commit d052efb
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions contrib/vm/cow
Expand Up @@ -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

Expand All @@ -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

0 comments on commit d052efb

Please sign in to comment.