Blame SOURCES/0270-livenet-don-t-attempt-to-download-the-image-for-ever.patch

64b87c
From e5f4bbd804e337a7efaf3a0cb4fc3a37b7e33b47 Mon Sep 17 00:00:00 2001
64b87c
From: Harald Hoyer <harald@redhat.com>
64b87c
Date: Fri, 3 Jul 2015 14:00:33 +0200
64b87c
Subject: [PATCH] livenet: don't attempt to download the image for every
64b87c
 interface
64b87c
64b87c
https://bugzilla.redhat.com/show_bug.cgi?id=1152485
64b87c
---
64b87c
 modules.d/90livenet/livenetroot.sh | 10 +++++++++-
64b87c
 1 file changed, 9 insertions(+), 1 deletion(-)
64b87c
64b87c
diff --git a/modules.d/90livenet/livenetroot.sh b/modules.d/90livenet/livenetroot.sh
1755ca
index 1bbee55b..2e36ee98 100755
64b87c
--- a/modules.d/90livenet/livenetroot.sh
64b87c
+++ b/modules.d/90livenet/livenetroot.sh
64b87c
@@ -7,12 +7,20 @@ type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
64b87c
 
64b87c
 PATH=/usr/sbin:/usr/bin:/sbin:/bin
64b87c
 
64b87c
+[ -e /tmp/livenet.downloaded ] && exit 0
64b87c
+
64b87c
 # args get passed from 40network/netroot
64b87c
 netroot="$2"
64b87c
 liveurl="${netroot#livenet:}"
64b87c
 info "fetching $liveurl"
64b87c
 imgfile=$(fetch_url "$liveurl")
64b87c
-[ $? = 0 ] || die "failed to download live image: error $?"
64b87c
+
64b87c
+if [ $? = 0 ]; then
64b87c
+	warn "failed to download live image: error $?"
64b87c
+	exit 1
64b87c
+fi
64b87c
+
64b87c
+> /tmp/livenet.downloaded
64b87c
 
64b87c
 # TODO: couldn't dmsquash-live-root handle this?
64b87c
 if [ ${imgfile##*.} = "iso" ]; then