:: Re: [DNG] /etc/network/interfaces b…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Rainer Weikusat
Date:  
À: dng
Sujet: Re: [DNG] /etc/network/interfaces bridges
Greg Olsen <gregolsen@???> writes:

[...]

> Rainer, since it wasn't in your previous example, I'm curious to know
> your opinion on the use of "bridge_waitport 0" ?


This is processed by the following code in
/etc/network/if-pre-up.d/bridge:

----------------
  if [ "$IF_BRIDGE_WAITPORT" ]
  then
    set x $IF_BRIDGE_WAITPORT &&
    shift &&
    WAIT="$1" &&
    shift &&
    WAITPORT="$@" &&
    if [ -z "$WAITPORT" ];then WAITPORT="$IF_BRIDGE_PORTS";fi &&
    STARTTIME=$(date +%s) &&
    NOTFOUND="true" &&
    /bin/echo -e "\nWaiting for a max of $WAIT seconds for $WAITPORT to become available." &&
    while [ "$(($(date +%s)-$STARTTIME))" -le "$WAIT" ] && [ -n "$NOTFOUND" ]
    do
      NOTFOUND=""
      for i in $WAITPORT
      do
        if ! grep -q "^[\ ]*$i:.*$" /proc/net/dev;then NOTFOUND="true";fi
      done
      if [ -n "$NOTFOUND" ];then sleep 1;fi
    done
  fi
----------------


This means a

bridge_waitport 0

has at best no effect (all configured ports already available) and at
worst, it will cause 1s wait for them.