From cb4891891ff007663fae46ae96afefa032ad9009 Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Fri, 11 Nov 2011 18:23:01 +0200 Subject: [PATCH] Abandon wget. Since curl is needed to find remote file sizes, lets do the whole downloading with curl. --- snf-image-host/common.sh.in | 1 - snf-image-host/configure.ac | 5 ----- snf-image-host/create | 3 ++- snf-image-host/defaults | 1 - 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/snf-image-host/common.sh.in b/snf-image-host/common.sh.in index 079a9ed..c699526 100644 --- a/snf-image-host/common.sh.in +++ b/snf-image-host/common.sh.in @@ -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@" diff --git a/snf-image-host/configure.ac b/snf-image-host/configure.ac index 9073712..e4fa0f0 100644 --- a/snf-image-host/configure.ac +++ b/snf-image-host/configure.ac @@ -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]) diff --git a/snf-image-host/create b/snf-image-host/create index 8935888..9064eb0 100755 --- a/snf-image-host/create +++ b/snf-image-host/create @@ -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 diff --git a/snf-image-host/defaults b/snf-image-host/defaults index 06d95e7..aebfffa 100644 --- a/snf-image-host/defaults +++ b/snf-image-host/defaults @@ -67,5 +67,4 @@ # INSTALL_MBR="install-mbr" # TIMELIMIT="timelimit" # CURL="curl" -# WGET="wget" # PROGRESS_MONITOR="snf-progress-monitor" -- 1.7.10.4