VirtualBox

Changeset 3907 in vbox for trunk/src


Ignore:
Timestamp:
Jul 27, 2007 2:27:44 PM (17 years ago)
Author:
vboxsync
Message:

Fixed a problem with host networking on SLES 10.1 whereby the interfaces were not brought up properly

Location:
trunk/src/VBox/Installer/linux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/VBoxAddIF.sh

    r3850 r3907  
    210210      exit 1
    211211    fi
    212     ifconfig $interface up > /dev/null 2>&1
     212    # On SUSE Linux Enterprise Server, the tunctl command does not take
     213    # effect at once, so we loop until it does.
     214    i=1
     215    while [ $i -le 10 ]
     216    do
     217      ifconfig "$interface" up > /dev/null 2>&1
     218      if ifconfig | grep "$interface" up > /dev/null 2>&1
     219      then
     220        i=11
     221      else
     222        i=`expr $i + 1`
     223        sleep .1
     224      fi
     225    done
    213226    if [ ! -z "$bridge" ]
    214227    then
  • trunk/src/VBox/Installer/linux/vboxnet.sh

    r3880 r3907  
    198198        then
    199199          # Try to create the interface
    200           if (VBoxTunctl -t "$1" -u "$2" > /dev/null 2>&1 &&
    201               ifconfig "$1" up 2> /dev/null)
     200          if VBoxTunctl -t "$1" -u "$2" > /dev/null 2>&1
    202201          then
    203             # Add the interface to a bridge if one was specified
    204             if [ ! -z "$3" ]
     202            # On SUSE Linux Enterprise Server, the interface does not
     203            # appear immediately, so we loop trying to bring it up.
     204            i=1
     205            while [ $i -le 10 ]
     206            do
     207              ifconfig "$1" up 2> /dev/null
     208              if ifconfig | grep "$1" > /dev/null 2>&1
     209              then
     210                # Add the interface to a bridge if one was specified
     211                if [ ! -z "$3" ]
     212                then
     213                  if brctl addif "$3" "$1" 2> /dev/null
     214                  then
     215                    echo "$1 $2 $3" > "$VARFILE"
     216                  else
     217                    echo "$1 $2" > "$VARFILE"
     218                    echo "Warning - failed to add interface $1 to the bridge $3"
     219                  fi
     220                else
     221                  echo "$1 $2" > $VARFILE
     222                fi
     223                i=20
     224              else
     225                i=`expr $i + 1`
     226                sleep .1
     227              fi
     228            done
     229            if [ $i -ne 20 ]
    205230            then
    206               if brctl addif "$3" "$1" 2> /dev/null
    207               then
    208                 echo "$1 $2 $3" > "$VARFILE"
    209               else
    210                 echo "$1 $2" > "$VARFILE"
    211                 echo "Warning - failed to add interface $1 to the bridge $3"
    212               fi
    213             else
    214               echo "$1 $2" > $VARFILE
     231              echo "Warning - failed to bring up the interface $1"
    215232            fi
    216233          else
    217             echo "Warning - invalid line in $CONFIG:"
    218             echo "  $line"
     234            echo "Warning - failed to create the interface $1 for the user $2"
    219235          fi
    220236        else
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette