|
@@ -19,9 +19,10 @@ function cleanup () {
|
19
|
19
|
|
20
|
20
|
trap cleanup EXIT
|
21
|
21
|
|
22
|
|
-imgfile=$1
|
23
|
|
-if [ -z "$imgfile" ] ; then
|
24
|
|
- echo Syntax: $0 /path/to/image/file
|
|
22
|
+imgfile=$1 ; shift
|
|
23
|
+command=$1 ; shift
|
|
24
|
+if [ -z "$imgfile" -o -z "$command" ] ; then
|
|
25
|
+ echo Syntax: $0 /path/to/image/file command [args..]
|
25
|
26
|
exit 1
|
26
|
27
|
fi
|
27
|
28
|
|
|
@@ -45,4 +46,4 @@ x=$imgfile.cow ; ln -s /dev/mapper/$dmname $x ; cowlink=$x
|
45
|
46
|
|
46
|
47
|
# Wait until killed
|
47
|
48
|
echo "Created $cowlink"
|
48
|
|
-while : ; do sleep 2147483647 ; done
|
|
49
|
+$command "$@" $cowlink
|