Revision 02485c69 snf-image-host/create

b/snf-image-host/create
39 39
if [ "$IMAGE_TYPE" = custom ]; then
40 40
    image_file=/dev/null
41 41
    image_size=\
42
        $("$CURL" -sI "$IMAGE_NAME" | grep ^Content-Length: | cut -d" " -f2)
42
        $($CURL -sI "$IMAGE_NAME" | grep ^Content-Length: | cut -d" " -f2)
43 43
else
44 44
    image_file="$IMAGE_DIR/$IMAGE_NAME-$ARCH.$IMAGE_TYPE"
45 45
    image_size="$(stat -L -c %s "$image_file")"
......
52 52

  
53 53
monitor="" #Empty if progress monitor support is disabled
54 54
if [ "$progress_monitor_support" = "yes" ]; then
55
    monitor="$(printf "%q" "$PROGRESS_MONITOR") \
55
    monitor="$PROGRESS_MONITOR \
56 56
        -i $(printf "%q" "$INSTANCE_NAME") -r $image_size"
57 57
fi
58 58

  
......
60 60
# This is needed for file disks.
61 61
if [ ! -b "$blockdev" ]; then
62 62
    original_blockdev="$blockdev"
63
    blockdev=$("$LOSETUP" -sf "$blockdev")
64
    add_cleanup "$LOSETUP" -d "$blockdev"
63
    blockdev=$($LOSETUP -sf "$blockdev")
64
    add_cleanup $LOSETUP -d "$blockdev"
65 65
fi
66 66

  
67 67
case "$IMAGE_TYPE" in
......
70 70
        format_disk0 "$blockdev" "$IMAGE_TYPE"
71 71

  
72 72
        # Install a new MBR
73
        "$INSTALL_MBR" -p 1 -i n "$blockdev"
73
        $INSTALL_MBR -p 1 -i n "$blockdev"
74 74

  
75 75
        target="$(map_disk0 "$blockdev")-1" #the root device
76 76
        add_cleanup unmap_disk0 "$blockdev"
......
122 122
"$QEMU_IMG" create -f qcow2 -b "$HELPER_IMG" "$snapshot"
123 123

  
124 124
echo "$(date +%Y:%m:%d-%H:%M:%S.%N) Starting helper VM..."
125
"$TIMELIMIT" -t "$HELPER_SOFT_TIMEOUT" -T "$HELPER_HARD_TIMEOUT" \
125
$TIMELIMIT -t "$HELPER_SOFT_TIMEOUT" -T "$HELPER_HARD_TIMEOUT" \
126 126
    kvm -runas "$HELPER_USER" -drive file="$snapshot" \
127 127
    -drive file="$blockdev",format=raw,if=virtio,cache=none \
128 128
    -boot c -serial stdio -serial file:"$result_file" \

Also available in: Unified diff