Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Debian User (http://www.linux-archive.org/debian-user/)
-   -   Fix gateway ping test for layer3 vswitch users (#643961) (http://www.linux-archive.org/debian-user/450628-fix-gateway-ping-test-layer3-vswitch-users-643961-a.html)

David Cantrell 11-10-2010 04:24 PM

Fix gateway ping test for layer3 vswitch users (#643961)
 
Wait a little longer for layer3 vswitch users on s390.
---
loader2/linuxrc.s390 | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/loader2/linuxrc.s390 b/loader2/linuxrc.s390
index ccf73dc..39b93d8 100644
--- a/loader2/linuxrc.s390
+++ b/loader2/linuxrc.s390
@@ -2085,10 +2085,15 @@ function configure_ipv4_gateway() {
fi
# BH FIXME: Workaround for manual MACADDR, need ping to update arp table
echo $"Trying to reach gateway $GATEWAY..."
- if ! ping -c 3 $GATEWAY >& /dev/null; then
- echo $"Could not reach your default gateway $GATEWAY"
- return 1
- fi
+ local i=1
+ while : ; do
+ ping -c 3 $GATEWAY >& /dev/null && break
+ i=$((i+1))
+ if [ "$i" -gt 3 ]; then
+ echo $"Could not reach your default gateway $GATEWAY"
+ return 1
+ fi
+ done
return 0
}

--
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 01:28 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.