Revision 14de44dc

b/snf-image-host/common.sh.in
34 34
QEMU_IMG="qemu-img"
35 35
INSTALL_MBR="install-mbr"
36 36
TIMELIMIT="timelimit"
37
CURL="curl"
38
WGET="wget"
37 39
PROGRESS_MONITOR="snf-progress-monitor"
38 40

  
39 41
progress_monitor_support="@progress_monitor_support@"
b/snf-image-host/configure.ac
117 117
  AC_MSG_ERROR([timelimit not found in $PATH:/usr/sbin:/sbin])
118 118
fi
119 119

  
120
AC_PATH_PROG(WGET, [wget], [], [$PATH:/usr/sbin:/sbin])
121
if test -z "$WGET" ; then
122
  AC_MSG_ERROR([wget not found in $PATH:/usr/sbin:/sbin])
123
fi
124

  
125
AC_PATH_PROG(CURL, [curl], [], [$PATH:/usr/sbin:/sbin])
126
if test -z "$CURL" ; then
127
  AC_MSG_ERROR([curl not found in $PATH:/usr/sbin:/sbin])
128
fi
129

  
120 130
AC_CONFIG_FILES([
121 131
    Makefile
122 132
])
b/snf-image-host/create
38 38

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

  
83 84
if [ "$IMAGE_TYPE" = "custom" ]; then
84
    wget -O - $IMAGE_NAME | $monitor dd bs=4M of="$target" oflag=direct
85
    "$WGET" -O - $IMAGE_NAME | $monitor dd bs=4M of="$target" oflag=direct
85 86
else
86 87
    # dd the dump to its new home :-)
87 88
    # Deploying an image file on a target block device is a streaming copy
b/snf-image-host/defaults
66 66
# QEMU_IMG="qemu-img"
67 67
# INSTALL_MBR="install-mbr"
68 68
# TIMELIMIT="timelimit"
69
# CURL="curl"
70
# WGET="wget"
69 71
# PROGRESS_MONITOR="snf-progress-monitor"

Also available in: Unified diff