Abandon wget.
authorNikos Skalkotos <skalkoto@grnet.gr>
Fri, 11 Nov 2011 16:23:01 +0000 (18:23 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Fri, 11 Nov 2011 16:23:01 +0000 (18:23 +0200)
Since curl is needed to find remote file sizes, lets do the whole
downloading with curl.

snf-image-host/common.sh.in
snf-image-host/configure.ac
snf-image-host/create
snf-image-host/defaults

index 079a9ed..c699526 100644 (file)
@@ -35,7 +35,6 @@ QEMU_IMG="qemu-img"
 INSTALL_MBR="install-mbr"
 TIMELIMIT="timelimit"
 CURL="curl"
-WGET="wget"
 PROGRESS_MONITOR="snf-progress-monitor"
 
 progress_monitor_support="@progress_monitor_support@"
index 9073712..e4fa0f0 100644 (file)
@@ -117,11 +117,6 @@ if test -z "$TIMELIMIT" ; then
   AC_MSG_ERROR([timelimit not found in $PATH:/usr/sbin:/sbin])
 fi
 
-AC_PATH_PROG(WGET, [wget], [], [$PATH:/usr/sbin:/sbin])
-if test -z "$WGET" ; then
-  AC_MSG_ERROR([wget not found in $PATH:/usr/sbin:/sbin])
-fi
-
 AC_PATH_PROG(CURL, [curl], [], [$PATH:/usr/sbin:/sbin])
 if test -z "$CURL" ; then
   AC_MSG_ERROR([curl not found in $PATH:/usr/sbin:/sbin])
index 8935888..9064eb0 100755 (executable)
@@ -82,7 +82,8 @@ case "$IMAGE_TYPE" in
 esac
 
 if [ "$IMAGE_TYPE" = "custom" ]; then
-    "$WGET" -O - $IMAGE_NAME | $monitor dd bs=4M of="$target" oflag=direct
+    "$CURL" "$IMAGE_NAME" 2>/dev/null |\
+        $monitor dd bs=4M of="$target" oflag=direct
 else
     # dd the dump to its new home :-)
     # Deploying an image file on a target block device is a streaming copy
index 06d95e7..aebfffa 100644 (file)
@@ -67,5 +67,4 @@
 # INSTALL_MBR="install-mbr"
 # TIMELIMIT="timelimit"
 # CURL="curl"
-# WGET="wget"
 # PROGRESS_MONITOR="snf-progress-monitor"