Re: [PATCH 2/2] Increase ping timeout for gateway/dns server reachability check (#536815)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack.

On 03/27/2010 01:49 AM, David Cantrell wrote:
> On s390, increase the ping test to 3 tries and a 30 second max timeout
> for each try.
> ---
>  loader/linuxrc.s390 |   15 ++++++++++-----
>  1 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/loader/linuxrc.s390 b/loader/linuxrc.s390
> index 454b02b..5634bdf 100644
> --- a/loader/linuxrc.s390
> +++ b/loader/linuxrc.s390
> @@ -65,6 +65,11 @@ if [ "$RUNKS" = "0" ]; then
>      RUNKS=""
>  fi
> 
> +# ping command to use to test host availability (for gateway & dns servers)
> +PINGOPTS="-c 3 -w 30"
> +PING="ping $PINGOPTS"
> +PING6="ping6 $PINGOPTS"
> +
>  # helper function to disable commands while running outside the initrd
>  function tv() {
>      if [ -z "$testing" ]; then
> @@ -2046,7 +2051,7 @@ function configure_ipv4_gateway() {
>          # (virtual) CTC(/A) seems to need some time to get functional
>          local i=1
>          while : ; do
> -            ping -c 1 -w 5 $GATEWAY >& /dev/null && break
> +            $PING $GATEWAY >& /dev/null && break
>              i=$((i+1))
>              if [ "$i" -gt 3 ]; then
>                  echo $"Could not reach gateway $GATEWAY within timeout"
> @@ -2054,7 +2059,7 @@ function configure_ipv4_gateway() {
>              fi
>          done
>      else
> -        if ! ping -c 1 -w 5 $GATEWAY >& /dev/null; then
> +        if ! $PING $GATEWAY >& /dev/null; then
>              echo $"Could not reach your default gateway $GATEWAY"
>              return 1
>          fi
> @@ -2148,7 +2153,7 @@ function configure_ipv6_gateway() {
>      fi
>      # BH FIXME: Workaround for manual MACADDR, need ping to update arp table
>      echo $"Trying to reach gateway $GATEWAY..."
> -    if ! ping6 -c 1 $GATEWAY >& /dev/null; then
> +    if ! $PING6 $GATEWAY >& /dev/null; then
>          echo $"Could not reach your default gateway $GATEWAY"
>          return 1
>      fi
> @@ -2279,7 +2284,7 @@ function handle_dns() {
>      echo $"Trying to reach DNS servers..."
>      if [ "$ipv6" ]; then
>          while read dnsitem; do
> -            if ! ping6 -c 1 $dnsitem >& /dev/null; then
> +            if ! $PING6 $dnsitem >& /dev/null; then
>                  echo $"Could not ping DNS server (might still serve DNS requests): $dnsitem"
>                  allgood="no"
>                  # this should not be a hard failure since some network
> @@ -2293,7 +2298,7 @@ function handle_dns() {
>              # reachable by ping, so it would make sense to use nslookup.
>              # However, nslookup fails with "Resolver Error 0 (no error)"
>              # at this stage of the setup progress => not useful
> -            if ! ping -c 1 -w 5 $dnsitem >& /dev/null; then
> +            if ! $PING $dnsitem >& /dev/null; then
>                  echo $"Could not ping DNS server: $dnsitem"
>  #                if nslookup $dnsitem $dnsitem >& /dev/null; then
>  #                    echo $" but could resolve DNS server with itself: $dnsitem"

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


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


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux