Revision 9a7af5df snf-image-host/create
b/snf-image-host/create | ||
---|---|---|
53 | 53 |
|
54 | 54 |
monitor="" #Empty if progress monitor support is disabled |
55 | 55 |
if [ "$progress_monitor_support" = "yes" ]; then |
56 |
image_size="$(stat -L -c %s "$IMAGE_FILE")"
|
|
56 |
image_size="$(stat -L -c %s "$image_file")"
|
|
57 | 57 |
monitor="$(printf "%q" "$PROGRESS_MONITOR") \ |
58 | 58 |
-i $(printf "%q" "$INSTANCE_NAME") -r $image_size" |
59 | 59 |
fi |
... | ... | |
77 | 77 |
# Deploying an image file on a target block device is a streaming |
78 | 78 |
# copy operation. Enable the direct I/O flag on the output fd to |
79 | 79 |
# avoid polluting the host cache with useless data. |
80 |
$monitor dd bs=4M if="$IMAGE_FILE" of="$root_dev" oflag=direct
|
|
80 |
$monitor dd bs=4M if="$image_file" of="$root_dev" oflag=direct
|
|
81 | 81 |
|
82 | 82 |
# Create a floppy image |
83 | 83 |
floppy=$(mktemp --tmpdir floppy.XXXXXX) |
Also available in: Unified diff