Skip to content

Commit

Permalink
patch from @koomie to allow wwgetvnfs retry (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
crbaird committed Feb 25, 2017
1 parent 06ac6da commit a109f2c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- warewulf-provision-3.7/initramfs/capabilities/transport-http/wwgetvnfs 2017-02-22 09:32:02.000000000 -0800
+++ warewulf-provision-3.7.patch/initramfs/capabilities/transport-http/wwgetvnfs 2017-02-25 11:03:08.000000000 -0800
@@ -27,12 +27,19 @@
fi

gunzip < /tmp/vnfs-download | bsdtar -pxf - &
+ WAIT_PID=$!
+
#gunzip < /tmp/vnfs-download | tar -xf - &

wget -O /tmp/vnfs-download http://$master/WW/vnfs?hwaddr=$WWINIT_HWADDR 2>&1
WGETEXIT=$?

- wait
+ if [ $WGETEXIT -ne 0 ];then
+ kill -9 $WAIT_PID
+ continue
+ fi
+
+ wait $WAIT_PID
if [ -f "$NEWROOT/sbin/init" ]; then
echo
exit 0
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ BuildRoot: %{?_tmppath}%{!?_tmppath:/var/tmp}/%{pname}-%{version}-%{release}-roo
DocDir: %{OHPC_PUB}/doc/contrib
Patch1: warewulf-provision.httpdconfdir.patch
Patch2: warewulf-provision.sles_stateful.patch
Patch3: warewulf-provision.wwgetvnfs.patch

%description
Warewulf >= 3 is a set of utilities designed to better enable
Expand Down Expand Up @@ -107,6 +108,7 @@ cd %{dname}
./autogen.sh
%patch1 -p1
%patch2 -p1
%patch3 -p1

%build
cd %{dname}
Expand Down

0 comments on commit a109f2c

Please sign in to comment.